if [[ $1 == "all" ]] ; then
shift
if [[ $# -eq 0 ]] ; then
- eval $(bash-colors --env | sed 's:^:export :')
+ eval "$(bash-colors --env | sed 's:^:export :')"
root=$(repo_root)
mj_init
while read -a line ; do
continue
fi
(
- out=$(env _proj=${proj} r rb all . 2>&1)
+ out=$(r rb all . 2>&1)
if [[ -n ${out} ]] ; then
- while read line ; do
- case ${line} in
- "Fast-forwarded "*) ;;
- "# "*)
- line="${line#[#] }"
- printf '%s### %s%-40s%s: %s\n' \
- "${BRACKET}" "${GOOD}" "${line%%:*}" "${NORMAL}" "${line#*:}"
- ;;
- *)
- printf '%s### %s%-40s%s: ERROR: %s\n' \
- "${BRACKET}" "${BAD}" "${dir}" "${NORMAL}" "${line}"
- ;;
- esac
- done < <(echo "${out}")
+ head=$(printf "%-40s" "${proj}")
+ echo "${out}" | sed "s:^:${head} :"
fi
_mj_child
) &
#exec r forall -p -c 'r rb all .' </dev/null
fi
- branches=$(g b | awk '
- {
- if ($0 ~ "^[*] *[(]no branch[)]") {
- next
- } else if ($0 ~ "^[*] *[(](HEAD )?detached (from|at) ") {
- next
- } else if ($1 == "*") {
- b = $2
- } else {
- list = list $1 " "
- }
- }
- END { print list b }')
- [[ -z ${branches} ]] && exit 0
-
- [[ -z ${GOOD} ]] && eval $(bash-colors --env)
- #echo "${GOOD}### ${PWD}${NORMAL}"
- # Skip if rebase is in progress.
- if [[ -e .git/rebase-merge/interactive ]] ; then
- echo -e "# ${_proj}: ${WARN}skipping due to active rebase${NORMAL}"
- exit 1
- fi
- for b in ${branches} ; do
- #echo " ${HILITE}### $b${NORMAL}"
- g co -q $b || exit 1
- if ! r rb -q "$@" ; then
- g rb-a
- fi
- done
- exit 0
+ exec git rb-all -q
fi
;;
clean)