🗝
summary refs log tree commit diff
path: root/cgit/new.sh
diff options
context:
space:
mode:
authormia <mia@mia.jetzt>2024-06-08 22:56:05 -0700
committermia <mia@mia.jetzt>2024-06-08 22:56:05 -0700
commit8cf813ff033bbc98a7dd40db6ac11e2e35c7e997 (patch)
treea451059194cbd4ba90993ebdaced4749448ec4df /cgit/new.sh
downloadasylum-8cf813ff033bbc98a7dd40db6ac11e2e35c7e997.tar.gz
asylum-8cf813ff033bbc98a7dd40db6ac11e2e35c7e997.zip
initial commit
Diffstat (limited to 'cgit/new.sh')
-rwxr-xr-xcgit/new.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/cgit/new.sh b/cgit/new.sh
new file mode 100755
index 0000000..25f11a1
--- /dev/null
+++ b/cgit/new.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# shellcheck disable=SC2086,SC2162
+set -e
+
+if [ -z "$1" ]; then
+	echo missing name
+	exit 1
+fi
+
+read -n1 -p "Make public? " public
+echo
+
+set -x
+ssh git@asylum mkdir $1.git '&&' cd $1.git '&&' git init --bare
+ssh -t git@asylum rm $1.git/description '&&' micro $1.git/description
+
+if [ $public = y ]; then
+	ssh git@asylum touch $1.git/git-daemon-export-ok
+fi