summaryrefslogtreecommitdiffstats
path: root/bin/get-comics
diff options
context:
space:
mode:
Diffstat (limited to 'bin/get-comics')
-rwxr-xr-xbin/get-comics8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/get-comics b/bin/get-comics
index 73f6d39..472344d 100755
--- a/bin/get-comics
+++ b/bin/get-comics
@@ -11,16 +11,16 @@ else
daysago=$1
fi
-top="$(pwd)/$(dirname $0)/../"
-for update in comics/* ; do
+top="$( cd "$(dirname "$0")/../" >/dev/null 2>&1 && pwd )"
+for update in ${top}/bin/comics/* ; do
comic=$(basename $update)
if [ "$output" = "true" ]; then
- ${update} $daysago &
+ ${update} "${top}" "${daysago}" &
else
myDate=$(date -Im --date "$daysago days ago")
echo "---------------- $myDate ----------------" >> ${top}/log/${comic}.log
- ${update} $daysago >> ${top}/log/${comic}.log 2>&1 &
+ ${update} "${top}" "${daysago}" >> ${top}/log/${comic}.log 2>&1 &
fi
sleep 2