[FIXED] bug in mkgit-nofxwiki.net

This commit is contained in:
Sami Samhuri 2009-11-24 09:57:57 -08:00
parent 8d8c462bc6
commit ec7ed4969c

View file

@ -1,6 +1,15 @@
#!/bin/sh
ssh nofxwiki.net "/home/sjs/bin/mkgit $1"
git remote add -m master origin ssh://nofxwiki.net/var/git/$1.git
git config branch.master.merge refs/heads/master
git push origin master
function die() {
echo "[error] $*"
exit 1
}
ssh nofxwiki.net "/home/sjs/bin/mkgit $1" || die "Can't create remote git repo"
if git remote show origin >/dev/null 2>&1; then
git remote rm origin
fi
git remote add -m master origin ssh://nofxwiki.net/var/git/$1.git || die "Can't add remote origin"
git config branch.master.remote origin || die "Can't set master's branch remote origin"
git config branch.master.merge refs/heads/master || die "Can't set master's branch merge"
git push origin master || die "Can't push to remote repo"