From eb068429c172d1a9765cc5e0cd7a9517fd588a74 Mon Sep 17 00:00:00 2001 From: Thomas Date: Jul 14 2017 16:04:23 +0000 Subject: Fix all rm issue --- diff --git a/scripts/mash_run.sh b/scripts/mash_run.sh index 13c2077..3cabbbf 100755 --- a/scripts/mash_run.sh +++ b/scripts/mash_run.sh @@ -132,7 +132,7 @@ mash_prepare () ( $optionv ) && echo " -> [INFO] updating mash config ${tag}.mash" mv $conf ${MASH_CONF}/${tag}.mash ( $optionv ) && echo " -> [INFO] cleaning mash cache ${tag}.buildlist" - rm $MASH_CACHE/${tag}.buildlist + [ -f $MASH_CACHE/${tag}.buildlist ] && rm $MASH_CACHE/${tag}.buildlist else rm $conf fi @@ -197,13 +197,13 @@ do if [ $? -eq 0 ] then echo " -> skipping. No new build in $TAG" &>> $LOG - rm -rf $BUILDLIST + [ -f $BUILDLIST ] && rm -rf $BUILDLIST continue else echo " -> updating cache for $TAG" &>> $LOG - cp $BUILDLIST $MASH_CACHE/$TAG.buildlist + cp $BUILDLIST $MASH_CACHE/$TAG.buildlist fi - rm -rf $BUILDLIST + [ -f $BUILDLIST ] && rm -rf $BUILDLIST fi mash_run "${TAG}" "${LOG}" & done