X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=buildd%2Fcleanup.sh;h=f9e72b1e8dde2a76cec9acd285d250a99e08f815;hp=9a4d5f6da5af6eeccf847e4b84109f6a93071a08;hb=3e18610b1a0891ed43156c6874842050fed002e6;hpb=2def18e419f1474c3904672ce297babbb4b9b501 diff --git a/buildd/cleanup.sh b/buildd/cleanup.sh index 9a4d5f6..f9e72b1 100755 --- a/buildd/cleanup.sh +++ b/buildd/cleanup.sh @@ -26,7 +26,7 @@ for flavour in grml-small_lenny grml-small_sid grml-medium_lenny grml-medium_sid FILES=$(ls -1 $flavour/$flavour*.iso | tail -"$DAYS") OLD_FILES=$(ls $flavour/$flavour*.iso | grep -v "$FILES") for file in $OLD_FILES ; do - REMOVE_ME="$REMOVE_ME $(find $file -mtime +$DAYS)" + REMOVE_ME="$REMOVE_ME $(find "$file" -mtime +$DAYS)" done fi done @@ -35,9 +35,10 @@ done for file in $REMOVE_ME ; do # remove ISOs: - test -f ${file} && rm -f $file - # ... but keep their md5sum: - test -f ${file}.md5 && mv ${file}.md5 .archive + test -f "${file}" && rm -f "$file" + # ... but keep their md5sum / sha1sum: + test -f "${file}".md5 && mv "${file}".md5 .archive + test -f "${file}".sha1 && mv "${file}".sha1 .archive done # inform on successful removal: