From: Rudolf Polzer Date: Sat, 20 Mar 2010 13:14:50 +0000 (+0100) Subject: ./all branch BRANCHNAME - makes a new branch X-Git-Tag: xonotic-v0.1.0preview~547 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=df60018c0be76935b077f30ae8cf1bb4d155ce58;ds=sidebyside ./all branch BRANCHNAME - makes a new branch --- diff --git a/all b/all index 91a38e60..924f75e6 100755 --- a/all +++ b/all @@ -55,13 +55,29 @@ case "$cmd" in "$0" branch ;; branch) - for d in $repos; do - cd "$d0/$d" - r=`git symbolic-ref HEAD` - r=${r#refs/heads/} - echo "$d is at $r" - cd "$d0" - done + if [ $# = 0 ]; then + for d in $repos; do + cd "$d0/$d" + r=`git symbolic-ref HEAD` + r=${r#refs/heads/} + echo "$d is at $r" + cd "$d0" + done + else + for d in $repos; do + cd "$d0/$d" + a= + while [ x"$a" != x"y" -a x"$a" != x"n" ]; do + echo "Branch in $d?" + read -r a + done + if [ x"$a" = "y" ]; then + git branch "$1" + fi + cd "$d0" + done + "$0" branch + fi ;; branches) for d in $repos; do