From: Mike Frysinger Date: Sun, 9 Jun 2013 20:22:01 +0000 (-0400) Subject: r: add "clean" X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7ba91d1a908167378314b1945999ddde4f795a03;p=home.git r: add "clean" --- diff --git a/.bin/r b/.bin/r index 90452b2..71541f6 100755 --- a/.bin/r +++ b/.bin/r @@ -120,6 +120,27 @@ rebase) exit 0 fi ;; +clean) + root=$(repo_root) + cd "${root}" || exit 1 + mj_init + while read -a line ; do + dir=${line[0]} + proj=${line[2]} + cd "${root}/${dir}" + ( + out=$(g clean "$@" 2>&1) + if [[ -n ${out} ]] ; then + echo "### ${proj}" + echo "${out}" + fi + _mj_child + ) & + mj_post_child + done < <(r l) + mj_finish + exit + ;; sb-push) sync_branch="v" @@ -138,7 +159,7 @@ sb-push) # fatal: The remote end hung up unexpectedly mj_init 16 - rlist=$(r list) + rlist=$(r l) tcnt=$(echo "${rlist}" | wc -l) cnt=1 while read line ; do @@ -151,7 +172,7 @@ sb-push) src="${sync_branch}" g l -1 ${src} >& /dev/null || src= mj_child g push --force ${remote}/${proj} ${src}:refs/sandbox/${USER}/${sync_branch} >/dev/null - done < <(r list) + done < <(echo "${rlist}") mj_finish exit 0