]> git.wh0rd.org Git - home.git/commitdiff
only clean out compiled objects rather than the whole tree (including a lot of source)
authorMike Frysinger <vapier@gentoo.org>
Thu, 15 Dec 2011 15:13:35 +0000 (10:13 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:42 +0000 (15:36 -0400)
.bin/cros-cbuildbot

index 7784d465d07b6c5e9264c863493e02b6b87923d2..3cdacf0e2e92dfcdd35d5fcd9a1edc880b052de6 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/bash
 
+if ! cbuildbot -h >& /dev/null ; then
+       cd ~/chromiumos || exit 1
+fi
+
+# cache the sudo timestamp
+sudo echo "" >/dev/null
+
 d=/usr/local/google/home/vapier
 if [[ -d ${d} ]] ; then
        d+="/trybot"
@@ -9,12 +16,24 @@ if [[ -d ${d} ]] ; then
        fi
 
        echo "Cleaning ${d}"
-       sudo rm -rf ${d}
+       pushd "${d}" >/dev/null
+       clean=(
+               built-sdk.tbz2
+               chroot
+               new-sdk-chroot
+               #sdks
+               src/build
+               test_results.tgz
+               trybot_archive
+       )
+       sudo rm -rf "${clean[@]}"
+       popd >/dev/null
 else
        exit 1
 fi
 
 # find all the buildbot branches
+echo "Looking up repo branches"
 repos=$(r b | cut -b4- | awk '$1 == "bb" {
        # Single repo output:
        #   bb                        | in src/third_party/portage-stable