From a9034ef7ac0375d8334e1ee27864f5c5034a6d24 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 9 Apr 2013 17:53:43 +0200 Subject: [PATCH] dont delete the new tar archives.. --- extract_storage_kernel+modules.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extract_storage_kernel+modules.sh b/extract_storage_kernel+modules.sh index dd5aa6d..885f4fa 100755 --- a/extract_storage_kernel+modules.sh +++ b/extract_storage_kernel+modules.sh @@ -69,10 +69,10 @@ echo "Doing garbage collection now" # cd $TARGET_BASE/$TARGET_NAME # loop through all results of current target -for i in $(ls -at1) ; do - # check if the jenkins build log still exists (and doesnt start with ".") +for i in $(find . -maxdepth 1 -type d|sort) ; do + # check if the jenkins build log still exists (and $i != ".") # and if not, delete the old target as well - if [ ! -L $JOB_HOME/$i ] && [ "${i:0:1}" != "." ] ; then + if [ ! -L $JOB_HOME/$i ] && [ "${i}" != "." ] ; then echo "Deleting $TARGET_BASE/$TARGET_NAME/$i" sudo rm -r ./$i fi -- 2.39.5