wok-next view zerobin/stuff/purge.sh @ rev 14643

Xorg. xorg-libXfixes: reformat; xorg-libXcomposite: up 0.4.4; xorg-libXrender: back 0.9.7 (latest Xorg mirror version is 0.9.7).
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Jun 02 18:41:37 2013 +0000 (2013-06-02)
parents
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 2> /dev/null
13 done
14 rmdir $i 2> /dev/null
15 done