diff options
-rw-r--r-- | templates/deploy.sh.erb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/deploy.sh.erb b/templates/deploy.sh.erb index 8d5dfd8..2c7f789 100644 --- a/templates/deploy.sh.erb +++ b/templates/deploy.sh.erb @@ -14,6 +14,7 @@ REPO_OWNER="<%= scope.lookupvar('ikiwiki::git_implementation') %>" REPO="<%= scope.lookupvar('ikiwiki::git_folder') %>/$NAME.git" REMOTE="$REPO_OWNER@localhost:$NAME" SITE=$BASE/$NAME +CWD="`pwd`" # Syntax check if [ -z "$INSTANCE" ]; then @@ -38,7 +39,13 @@ ikiwiki-makerepo git $SITE/"$INSTANCE"_src_tmp $REPO git clone $REPO $SITE/"$INSTANCE"_src # Fix remotes -( cd $SITE/"$INSTANCE"_src && git remote rm origin && git remote add origin $REMOTE ) + +cd $SITE/"$INSTANCE"_src +git remote rm origin +git remote add origin $REMOTE +git config branch.master.remote origin +git config branch.master.merge refs/heads/master +cd $CWD # Cleanup rm -rf $SITE/"$INSTANCE"_src_tmp |