aboutsummaryrefslogtreecommitdiff
path: root/modules/git/git-shell-commands/init
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2025-11-15 00:22:34 +0100
committerMax Audron <audron@cocaine.farm>2025-11-15 00:22:34 +0100
commit53d246c2adda06165b21c55a2d5a4dc867b66994 (patch)
tree133084ec0d492f5bb731214a91f744492cb050a4 /modules/git/git-shell-commands/init
parentadd readme (diff)
add git shell scripts
Diffstat (limited to 'modules/git/git-shell-commands/init')
-rwxr-xr-xmodules/git/git-shell-commands/init9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/git/git-shell-commands/init b/modules/git/git-shell-commands/init
new file mode 100755
index 0000000..603b817
--- /dev/null
+++ b/modules/git/git-shell-commands/init
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+
+REPO="$1"
+
+if [ ! -f "$REPO/config" ]; then
+ mkdir -p "$REPO"
+ cd "$REPO"
+ git init --bare --shared
+fi