From 0f71e16bfd528d9e48f8ce47ab5f220ca3267723 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 15 Dec 2011 10:13:35 -0500 Subject: [PATCH] only clean out compiled objects rather than the whole tree (including a lot of source) --- .bin/cros-cbuildbot | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.bin/cros-cbuildbot b/.bin/cros-cbuildbot index 7784d46..3cdacf0 100755 --- a/.bin/cros-cbuildbot +++ b/.bin/cros-cbuildbot @@ -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 -- 2.39.5