cmd=sync
shift
;;
+rb-all)
+ cmd=rebase
+ shift
+ set -- all "$@"
+ ;;
*)
cmd=$1
shift
repo_root() {
local root=${PWD}
- while [[ ! -d ${root}/.repo && ${root} != "/" ]] ; do
+ while [[ ! -d ${root}/.repo && ${root:-/} != "/" ]] ; do
root=${root%/*}
done
echo "${root}"
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}
out=$(env _proj=${proj} r rb all . 2>&1)
if [[ -n ${out} ]] ; then
while read line ; do
- if [[ ${line} == "# "* ]] ; then
+ case ${line} in
+ "Fast-forwarded "*) ;;
+ "# "*)
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
+ ;;
+ esac
done < <(echo "${out}")
fi
_mj_child