Browse Source

[enh] deliver.sh: save and restore previous state of main repo.

Moul 2 years ago
parent
commit
69f362c76c
1 changed files with 5 additions and 1 deletions
  1. 5 1
      deliver.sh

+ 5 - 1
deliver.sh

@@ -68,6 +68,9 @@ prepare_git_repository() {
     tmp_repo="/tmp/21sh_delivery"
     rm -rf $tmp_repo
     cp -r ../21sh $tmp_repo
+    git checkout master
+    git branch -D deliver
+    git stash pop
     cd $tmp_repo
     rm -rf .git
     git init
@@ -85,7 +88,8 @@ ready() {
     git push -u origin master
 }
 
-git checkout -B deliver
+git stash save "Deliver stash"
+git checkout -b deliver
 add_42_headers
 clean_repository
 prepare_git_repository