Fix buck run when $ONOS_DIR does not exist

Change-Id: I437e1a3f7afb30f0324260cb424fcc669ca03972
This commit is contained in:
Charles Chan 2016-08-22 16:35:39 -07:00 committed by Charles Chan
parent 250d028179
commit 28267ea1ff

View File

@ -14,7 +14,7 @@ set -e
ONOS_DIR=$(tar tf $ONOS_TAR | head -n 1 | cut -d/ -f1)
if [ -d $ONOS_DIR -a "$1" = "clean" ]; then
if [ -d $ONOS_DIR -a "$1" = "clean" -o ! -d $ONOS_DIR ]; then
# Blitz previously unrolled onos- directory
rm -fr $ONOS_DIR