bin/mkgit-nofxwiki.net
2009-11-24 09:57:57 -08:00

15 lines
555 B
Bash
Executable file

#!/bin/sh
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"