summaryrefslogtreecommitdiff
path: root/init-repo.sh
diff options
context:
space:
mode:
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