15 lines
555 B
Bash
Executable file
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"
|