From 58f9cf761a5f4b7968de2286797e2e4d2284fff8 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Tue, 4 Jun 2013 12:51:54 -0500 Subject: [PATCH] Check for .stackenv * Skip sourcing .stackenv if it doesn't exist * Remove .stackenv at end Change-Id: Icc2e8e4ea6fada5f9d0b906fedacdbe2c1b3b320 --- clean.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clean.sh b/clean.sh index cf24f278b8..ffc462c6f3 100755 --- a/clean.sh +++ b/clean.sh @@ -19,7 +19,9 @@ source $TOP_DIR/functions source $TOP_DIR/stackrc # Get the variables that are set in stack.sh -source $TOP_DIR/.stackenv +if [[ -r $TOP_DIR/.stackenv ]]; then + source $TOP_DIR/.stackenv +fi # Determine what system we are running on. This provides ``os_VENDOR``, # ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME`` @@ -88,4 +90,4 @@ cleanup_database # FIXED_IP_ADDR in br100 # Clean up files -#rm -f .stackenv +rm -f $TOP_DIR/.stackenv