From: hno <> Date: Fri, 30 Dec 2005 09:21:19 +0000 (+0000) Subject: Fix cleanup of old snapshots again. Got broken some months ago.. X-Git-Tag: SQUID_3_0_PRE4~404 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e45df18495f5ee1e3ed1befe8d49c39a56391402;p=thirdparty%2Fsquid.git Fix cleanup of old snapshots again. Got broken some months ago.. --- diff --git a/mksnapshot-cron.sh b/mksnapshot-cron.sh index 29f93dad20..daa7d4c114 100755 --- a/mksnapshot-cron.sh +++ b/mksnapshot-cron.sh @@ -42,7 +42,7 @@ make_snapshot() ln -s $file $dst/squid-$ver.snapshot$type # cleanup old snapshots - ls $dst/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$type | sed -e 's/.*\(-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$type'\)/\1/' | sort -r | tail +$save | while read f; do + ls $dst/*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$type | sed -e 's/.*-\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'$type'\)/\1/' | sort -r | tail +$save | while read f; do rm -f $dst/*-$f done done