wok-6.x diff zerobin/stuff/purge.sh @ rev 21635
updated openobex and openobex-dev (1.7.1 -> 1.7.2)
author | Hans-G?nter Theisgen |
---|---|
date | Tue May 28 16:27:00 2019 +0100 (2019-05-28) |
parents | |
children | 5b0e64c0628a |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/zerobin/stuff/purge.sh Tue May 28 16:27:00 2019 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +cd $(dirname $0) 1.7 +for i in ?? ; do 1.8 + for j in $i/?? ; do 1.9 + for k in $j/* ; do 1.10 + [ -f $k ] || continue 1.11 + grep -qs '"expire_date":' $k || continue 1.12 + [ $(sed 's/.*"expire_date":\([0-9]*\).*/\1/' $k) -lt \ 1.13 + $(date +%s) ] && rm -rf $k* 1.14 + done 1.15 + rmdir $j 2> /dev/null 1.16 + done 1.17 + rmdir $i 2> /dev/null 1.18 +done