summaryrefslogtreecommitdiff
path: root/bin/git-init-remote
diff options
context:
space:
mode:
Diffstat (limited to 'bin/git-init-remote')
-rwxr-xr-xbin/git-init-remote15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/git-init-remote b/bin/git-init-remote
new file mode 100755
index 0000000..6b79aaa
--- /dev/null
+++ b/bin/git-init-remote
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+NAME=$1
+DESC=$2
+AUTH=$3
+
+echo "Creating $NAME"
+echo "Description: $DESC"
+echo "Owner: $AUTH"
+
+ssh git@$VPS_HOST "git init --bare /home/git/$NAME"
+ssh git@$VPS_HOST "rm /home/git/$NAME/description"
+ssh git@$VPS_HOST "echo \"$DESC\" > /home/git/$NAME/description"
+ssh git@$VPS_HOST "echo \"$AUTH\" > /home/git/$NAME/owner"
+ssh git@$VPS_HOST "git --git-dir=/home/git/$NAME config gitweb.owner \"$AUTH\""