wok view zerobin/stuff/purge.sh @ rev 24195

updated perl-datetime-format-w3cdtf (0.07 -> 0.08)
author Hans-G?nter Theisgen
date Fri Dec 31 14:58:36 2021 +0100 (2021-12-31)
parents 2eb82e8dc17d
children
line source
1 #!/bin/sh
3 cd $(dirname $0)
4 for i in ?? ; do
5 for j in $i/?? ; do
6 for k in $j/* ; do
7 [ -f $k ] || continue
8 grep -qs '"expire_date":' $k || continue
9 [ $(sed 's/.*"expire_date":\([0-9]*\).*/\1/' $k) -lt \
10 $(date +%s) ] && rm -rf $k*
11 done
12 rmdir $j
13 done
14 rmdir $i
15 done 2>/dev/null