From: Mike Frysinger Date: Thu, 5 Apr 2012 20:32:20 +0000 (-0400) Subject: implement repo-wide rb all X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e051dd74e9a5ed818d1d57af551e36434d83c5fa;p=home.git implement repo-wide rb all --- diff --git a/.bin/r b/.bin/r index 68d624a..518b266 100755 --- a/.bin/r +++ b/.bin/r @@ -14,6 +14,10 @@ case ${acmd:-${cmd}} in rebase) if [[ $1 == "all" ]] ; then shift + if [[ $# -eq 0 ]] ; then + exec r forall -c 'r rb all .' + fi + branches=$(g b | awk ' { if ($0 ~ "^[*] *[(]no branch[)]") { @@ -25,10 +29,16 @@ rebase) } } END { print list b }') + [[ -z ${branches} ]] && exit 0 + + eval $(bash-colors --env) + echo "${GOOD}### ${PWD}${NORMAL}" for b in ${branches} ; do - echo " ### $b" + echo " ${HILITE}### $b${NORMAL}" g co $b || exit 1 - r rb "$@" || exit 1 + if ! r rb "$@" ; then + g rb-a + fi done exit 0 fi