]> git.wh0rd.org Git - home.git/commitdiff
r: add "clean"
authorMike Frysinger <vapier@gentoo.org>
Sun, 9 Jun 2013 20:22:01 +0000 (16:22 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 9 Jun 2013 20:22:01 +0000 (16:22 -0400)
.bin/r

diff --git a/.bin/r b/.bin/r
index 90452b239b8609496d0d9e92b225bdbd3af42052..71541f6d2a5ebbd4143e3a62df2a52c7d6e61aef 100755 (executable)
--- 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