diff options
author | Peter Palfrader <peter@palfrader.org> | 2019-05-01 19:15:28 +0200 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2019-05-01 19:15:28 +0200 |
commit | f11e92d8fa132f1d22b085c68b78fd3d997a75e6 (patch) | |
tree | 76c55dbfd4e0092ff8aff87c1cdfb483baa89df5 /publish-purge | |
parent | 0157d644249c084c78690476e108d63ceb5cf5e2 (diff) |
publish-purge: only purge if ttl is a positive integer (so 0 means "do not purge")
Diffstat (limited to 'publish-purge')
-rwxr-xr-x | publish-purge | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/publish-purge b/publish-purge index 0be0fd7..cc17338 100755 --- a/publish-purge +++ b/publish-purge @@ -67,7 +67,7 @@ cleanit() fi fi - if test_if_ancient "$d" "$ttl"; then + if [ "$ttl" -gt 0 ] && test_if_ancient "$d" "$ttl"; then [ "$optVerbose" -ge "1" ] && echo "- Purging: $d" [ "$optDonot" = "1" ] || rm -rf "$d" fi |