X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=.bin%2Fr;h=848378ea2eedcc6abeba8fed90c3f680ce8800d4;hb=2658092962001fbf7cf72d69fe03f761d61dd0a1;hp=24fc5e4090645fdbb32d926cbfecef8fa8544e90;hpb=b45330910922db679ffb7f5e94814f044f97df89;p=home.git diff --git a/.bin/r b/.bin/r index 24fc5e4..848378e 100755 --- a/.bin/r +++ b/.bin/r @@ -17,6 +17,11 @@ s) cmd=sync shift ;; +rb-all) + cmd=rebase + shift + set -- all "$@" + ;; *) cmd=$1 shift @@ -54,7 +59,7 @@ mj_finish() { repo_root() { local root=${PWD} - while [[ ! -d ${root}/.repo && ${root} != "/" ]] ; do + while [[ ! -d ${root}/.repo && ${root:-/} != "/" ]] ; do root=${root%/*} done echo "${root}" @@ -64,7 +69,7 @@ process_reviewers() { local r arr=() for r in ${*//,/ } ; do case ${r} in - *OWNERS) + OWNERS*|*/OWNERS*) local owners=$( awk -F'@' ' ($2 == "chromium.org" || $2 == "google.com") {list = list "," $1} @@ -132,7 +137,7 @@ rebase) 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 @@ -143,18 +148,10 @@ rebase) 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 - if [[ ${line} == "# "* ]] ; then - line="${line#[#] }" - printf '%s### %s%-40s%s: %s\n' \ - "${BRACKET}" "${GOOD}" "${line%%:*}" "${NORMAL}" "${line#*:}" - else - printf '%s### %s%-40s%s: ERROR: %s\n' \ - "${BRACKET}" "${BAD}" "${dir}" "${NORMAL}" "${line}" - fi - done < <(echo "${out}") + head=$(printf "%-40s" "${proj}") + echo "${out}" | sed "s:^:${head} :" fi _mj_child ) & @@ -165,36 +162,7 @@ rebase) #exec r forall -p -c 'r rb all .'