]> git.phdru.name Git - git-scripts.git/commitdiff
Remove current/master branch from web mirror
authorOleg Broytman <phd@phdru.name>
Sat, 4 Jul 2015 16:11:57 +0000 (19:11 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 4 Jul 2015 16:13:58 +0000 (19:13 +0300)
update

diff --git a/update b/update
index aa62c97ea9762dc153a89ca83b1439f7dac5244a..7eb5ffcba2b4087591949db022256efec58c863b 100755 (executable)
--- a/update
+++ b/update
@@ -19,6 +19,9 @@ fi
 git pull --ff-only current master &&
 
 web="`git config --get --path remote.web.url`" &&
-[ -n "$web" ] && git push web
+if [ -n "$web" ]; then
+   git push web &&
+   cd "$web" && git branch -dr current/master
+fi &&
 
 cd "$current" && exec git pull origin