sudo echo "" >/dev/null
d=/usr/local/google/home/vapier
-if [[ -d ${d} ]] ; then
- d+="/trybot"
- if mount | grep -qs $d ; then
- echo "mounts found in $d"
- exit 1
- fi
+if [[ ! -d ${d} ]] ; then
+ exit 1
+fi
+
+d+="/trybot"
+if mount | grep -qs $d ; then
+ echo "mounts found in $d"
+ exit 1
+fi
+if [[ $1 == "--noclean" ]] ; then
+ shift
+else
echo "Cleaning ${d}"
pushd "${d}" >/dev/null
clean=(
)
sudo rm -rf "${clean[@]}"
popd >/dev/null
-else
- exit 1
fi
# find all the buildbot branches