From: Mike Frysinger Date: Thu, 6 Sep 2012 17:04:34 +0000 (-0400) Subject: handle initial runs better (missing dirs) X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=bf6ab86454895447808e9f36e2a34e42c81c9293;p=home.git handle initial runs better (missing dirs) --- diff --git a/.bin/cros-cbuildbot b/.bin/cros-cbuildbot index 5456f9a..d0fbcc5 100755 --- a/.bin/cros-cbuildbot +++ b/.bin/cros-cbuildbot @@ -1,5 +1,7 @@ #!/bin/bash +set -ex + vexec() { local i fmt for (( i = 1; i <= $#; ++i )) ; do @@ -17,7 +19,7 @@ vexec() { exec "$@" } -cd ~/chromiumos || exit 1 +cd ~/chromiumos # cache the sudo timestamp sudo echo "" >/dev/null @@ -28,14 +30,17 @@ if [[ ! -d ${d} ]] ; then fi d+="/trybot" +mkdir -p "${d}" if mount | grep -qs $d ; then echo "mounts found in $d" exit 1 fi -rd=$(readlink $d) -if mount | grep -qs $rd ; then - echo "mounts found in $rd" - exit 1 +if [[ -L $d ]] ; then + rd=$(readlink $d) + if mount | grep -qs $rd ; then + echo "mounts found in $rd" + exit 1 + fi fi if [[ $1 == "--noclean" ]] ; then