From 7372ff94e3481094abd4f2601e06fd807578c5b3 Mon Sep 17 00:00:00 2001 From: Erhard Rank Date: Fri, 16 Sep 2011 14:45:28 +0000 Subject: [PATCH] clean up downloaded profile files --- deployment.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deployment.sh b/deployment.sh index 45c974d..7a371fc 100755 --- a/deployment.sh +++ b/deployment.sh @@ -304,16 +304,17 @@ if [ -n "$PROFILE" ] && [ -n "$NETSCRIPT_SERVER" ] ; then done DOWNLOADDIR=$(echo ${NETSCRIPT_SERVER}/$PROFILE | sed 's|^http://||') - echo $DOWNLOADDIR if [ -d "$DOWNLOADDIR" ] ; then if [ -s "$DOWNLOADDIR/default.sh" ] ; then - rm -f $DOWNLOADDIR/index.html* + rm -rf $DOWNLOADDIR/index.html* mv $DOWNLOADDIR/* ./ rmdir -p $DOWNLOADDIR echo "Loading profile $PROFILE" . default.sh else echo "Error: No default.sh in profile $PROFILE from $NETSCRIPT_SERVER" >&2 + rm -rf $DOWNLOADDIR/* + rmdir -p $DOWNLOADDIR exit 1 fi else