diff options
Diffstat (limited to 'cleaner.in')
-rwxr-xr-x | cleaner.in | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -53,8 +53,12 @@ case $# in esac thisweek=$(date +%U) -lastweek=$((thisweek - retainweeks)) - +if [ $thisweek -gt $retainweeks ]; then + lastweek=$((thisweek - retainweeks)) +else + lastweek=$((thisweek + 53 - retainweeks)) +fi + $verbose \# removing from $dir files ending in $suffix and older than week $lastweek if [ -z "$suffix" ]; then |