diff options
author | root <root@vm-staticweb.spline.inf.fu-berlin.de> | 2012-05-10 02:54:23 +0000 |
---|---|---|
committer | root <root@vm-staticweb.spline.inf.fu-berlin.de> | 2012-05-10 02:54:23 +0000 |
commit | 786607ab89965807640936e7f38d27d7ba37beb4 (patch) | |
tree | f8c6b25784c7bcff98f1e5c70e30e57a897efa46 /bin/get-comics | |
parent | 3073ba3d8ae1f7adda14ba8e2f9ca04d32a64425 (diff) | |
download | comics-786607ab89965807640936e7f38d27d7ba37beb4.tar.gz comics-786607ab89965807640936e7f38d27d7ba37beb4.tar.bz2 comics-786607ab89965807640936e7f38d27d7ba37beb4.zip |
bin/get-comics: modified script to work with new paths
Diffstat (limited to 'bin/get-comics')
-rwxr-xr-x | bin/get-comics | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/bin/get-comics b/bin/get-comics index cc86ca1..73f6d39 100755 --- a/bin/get-comics +++ b/bin/get-comics @@ -11,18 +11,16 @@ else daysago=$1 fi -myDate=$(date -Im --date "$daysago days ago") -dir="$(pwd)/$(dirname $0)/.." +top="$(pwd)/$(dirname $0)/../" +for update in comics/* ; do -find ${dir}/htdocs/imgs -maxdepth 2 -name 'get' -type f \ - -executable -printf '%h\n' | while read i ; do - - comic=$(basename $i) + comic=$(basename $update) if [ "$output" = "true" ]; then - ${i}/get $daysago + ${update} $daysago & else - echo "---------------- $myDate ----------------" >> ${dir}/log/${comic}.log - ${i}/get $daysago >> ${dir}/log/${comic}.log 2>&1 & + myDate=$(date -Im --date "$daysago days ago") + echo "---------------- $myDate ----------------" >> ${top}/log/${comic}.log + ${update} $daysago >> ${top}/log/${comic}.log 2>&1 & fi sleep 2 |