summaryrefslogtreecommitdiff
path: root/init-repo.sh
diff options
context:
space:
mode:
authora73x <[email protected]>2024-08-25 10:04:00 +0100
committera73x <[email protected]>2024-08-25 10:04:00 +0100
commit01fae90b3d69acb94f76b51eb453037fdf36bbcc (patch)
tree264602e48a01ed8aab007f0cc6e19b44dd13b892 /init-repo.sh
init
Diffstat (limited to 'init-repo.sh')
-rw-r--r--init-repo.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/init-repo.sh b/init-repo.sh
new file mode 100644
index 0000000..29cab4e
--- /dev/null
+++ b/init-repo.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+REPO_DIR="/git-server/repos/$1"
+if [ ! -d "$REPO_DIR" ]; then
+ mkdir -p "$REPO_DIR"
+ cd "$REPO_DIR"
+ git init --bare
+fi