wok annotate zerobin/stuff/purge.sh @ rev 25236
updated python-shapely (1.7.0 -> 1.7.1)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Jul 13 17:41:12 2022 +0100 (2022-07-13) |
parents | 2eb82e8dc17d |
children |
rev | line source |
---|---|
pascal@13153 | 1 #!/bin/sh |
pascal@13153 | 2 |
pascal@13153 | 3 cd $(dirname $0) |
pascal@13153 | 4 for i in ?? ; do |
pascal@13153 | 5 for j in $i/?? ; do |
pascal@13153 | 6 for k in $j/* ; do |
pascal@13153 | 7 [ -f $k ] || continue |
pascal@13153 | 8 grep -qs '"expire_date":' $k || continue |
pascal@13153 | 9 [ $(sed 's/.*"expire_date":\([0-9]*\).*/\1/' $k) -lt \ |
pascal@13153 | 10 $(date +%s) ] && rm -rf $k* |
pascal@13153 | 11 done |
pascal@24011 | 12 rmdir $j |
pascal@13153 | 13 done |
pascal@24011 | 14 rmdir $i |
pascal@24011 | 15 done 2>/dev/null |