]> gitweb.fluxo.info Git - puppet-ikiwiki.git/commitdiff
Set ikiwiki's upstream branch
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 12 Apr 2013 00:19:45 +0000 (21:19 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 12 Apr 2013 00:19:45 +0000 (21:19 -0300)
templates/deploy.sh.erb

index 8d5dfd842b737666ec8a4bf2328bd08e9c408efe..2c7f7890d78dc832695383cf2f8448c7be9f25e0 100644 (file)
@@ -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