From 771a2acb8f816a6fa0b9d067b4bec10dc96fb1dd Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 27 Jan 2013 21:07:05 +0000 Subject: 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 --- publish-purge | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'publish-purge') 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)" -- cgit v1.2.3