[FIXED] bug in mkgit-nofxwiki.net
This commit is contained in:
parent
8d8c462bc6
commit
ec7ed4969c
1 changed files with 13 additions and 4 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue