diff options
author | Peter Palfrader <peter@palfrader.org> | 2013-01-27 21:07:05 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2013-01-27 21:07:05 +0000 |
commit | 771a2acb8f816a6fa0b9d067b4bec10dc96fb1dd (patch) | |
tree | 2edab08cd33ea22e1d6ecfd7c9e3a40981f51ceb /publish-purge | |
parent | 28026e53148d94b0388d285c4429929d9b6aa3b8 (diff) |
Use the mtime of .publish.ttl if it exists
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@582 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'publish-purge')
-rwxr-xr-x | publish-purge | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/publish-purge b/publish-purge index d5beddd..a6628be 100755 --- a/publish-purge +++ b/publish-purge @@ -34,7 +34,11 @@ test_if_ancient() local d="$1" local ttl="$2" - mtime="$(stat --format "%Y" "$d")" + if [ -e "$d/.publish.ttl" ]; then + mtime="$(stat --format "%Y" "$d/.publish.ttl")" + else + mtime="$(stat --format "%Y" "$d")" + fi tod="$(($mtime + 3600*24*$ttl))" now="$(date +%s)" |