X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b81af2c2bb8a4b41b8adbb1c351fbd0964542558..a0732d0baf2d71a9360a2206b94236a0e3496097:/debian/apt.cron.daily diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index 7ee7e46db..2d93a5ba4 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -74,7 +74,7 @@ check_size_constraints() { # min-age in days MaxAge=0 - MinAge=1 + MinAge=2 MaxSize=0 CacheDir="var/cache/apt" CacheArchive="archives/" @@ -110,7 +110,7 @@ check_size_constraints() MinAge=$(($MinAge*24*60*60)) # reverse-sort by mtime - for file in $(ls -rt $Cache/*.deb); do + for file in $(ls -rt $Cache/*.deb 2>/dev/null); do du=$(du -s $Cache) size=${du%%/*} # check if the cache is small enough @@ -125,7 +125,7 @@ check_size_constraints() #echo "$file ($delta), $MinAge" if [ $delta -le $MinAge ]; then #echo "Skiping $file (delta=$delta)" - continue + break fi fi