3 if ! cbuildbot -h >& /dev/null ; then
4 cd ~/chromiumos || exit 1
7 # cache the sudo timestamp
8 sudo echo "" >/dev/null
10 d=/usr/local/google/home/vapier
11 if [[ ! -d ${d} ]] ; then
16 if mount | grep -qs $d ; then
17 echo "mounts found in $d"
21 if mount | grep -qs $rd ; then
22 echo "mounts found in $rd"
26 if [[ $1 == "--noclean" ]] ; then
30 pushd "${d}" >/dev/null
40 sudo rm -rf "${clean[@]}"
41 sudo find "${d}"/sdks -mtime +3 -delete
45 # find all the buildbot branches
46 echo "Looking up repo branches"
47 repos=$(r b | cut -b4- | awk '$1 == "bb" {
49 # bb | in src/third_party/portage-stable
52 # src/third_party/portage-stable
53 # src/third_party/chromiumos-overlay
62 if [[ -n ${repos} ]] ; then
63 echo "Auto pulling patches from 'bb' branch in repos:"
64 printf '\t%s\n' ${repos}
67 for r in ${repos} ; do
68 r=$(r list | awk -v r="${r}" '$1 == r { print $NF }')
72 set -- -p "${p_flag}" "$@"
75 vexec() { echo "$@"; exec "$@"; }
76 vexec cbuildbot --buildroot=${d} "$@"