summaryrefslogtreecommitdiffstats
path: root/create-git-repo.sh
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-07-10 21:46:09 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-07-10 21:48:01 +0200
commitd2a44efbe707b7210107fabce58fb99c1a3b251e (patch)
treec5527ba09d85d044326a06393ad8d0f88d8ac167 /create-git-repo.sh
parent5a311acfe51d396dd65fe72ec478ceebea64f6c1 (diff)
downloadbin-d2a44efbe707b7210107fabce58fb99c1a3b251e.tar.gz
bin-d2a44efbe707b7210107fabce58fb99c1a3b251e.tar.xz
mass commit
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'create-git-repo.sh')
-rwxr-xr-xcreate-git-repo.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/create-git-repo.sh b/create-git-repo.sh
new file mode 100755
index 0000000..b724fe9
--- /dev/null
+++ b/create-git-repo.sh
@@ -0,0 +1,26 @@
+#!/bin/zsh
+
+if [[ -z $1 ]]; then
+ echo "$(basename $0) <reponame>"
+ exit 1
+fi
+
+repo=$1
+server="karif"
+remotename="karif"
+basepath=/srv/git/users/flo
+
+ssh $server mkdir $basepath/$repo
+ssh $server git init --bare $basepath/$repo
+ssh $server touch $basepath/$repo/git-daemon-export-ok
+
+git remote add $remotename ssh://${server}${basepath}/$repo
+echo -n "Description: "
+read description
+ssh $server echo $description \> $basepath/$repo/description
+
+echo -n "Branch to push: "
+read branch
+git push $remotename $branch
+
+echo "All done."