summaryrefslogtreecommitdiffstats
path: root/bin/comics/geekandpoke
diff options
context:
space:
mode:
Diffstat (limited to 'bin/comics/geekandpoke')
-rwxr-xr-xbin/comics/geekandpoke4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/comics/geekandpoke b/bin/comics/geekandpoke
index e25d8e7..d9e46bc 100755
--- a/bin/comics/geekandpoke
+++ b/bin/comics/geekandpoke
@@ -11,7 +11,7 @@ wget ${wget_args} --user-agent="$browser" \
--header="Referer: http://geekandpoke.typepad.com/" \
"http://geekandpoke.typepad.com/" -O index.html
-if [ -e index.html ]; then
+if [ -s index.html ]; then
date="$(LC_ALL=C date +"%B %d, %Y" -d "$daysago days ago")"
nomen="$(grep -A30 "$date" index.html | grep "img class" | head -1 | sed 's/.*img class=[^\/]*src="\([^"]\+\)".*/\1/')"
imgname="$(echo $nomen | tr '/' '\n' | tail -n 1)"
@@ -27,7 +27,7 @@ if [ -e index.html ]; then
wget ${wget_args} --header="Referer: http://geekandpoke.typepad.com/" \
--user-agent="$browser" "$nomen"
- if [ -e "${tmp}/${imgname}" ]; then
+ if [ -s "${tmp}/${imgname}" ]; then
mv "${tmp}/${imgname}" "${image_dir}/$newn"
rm -f "${comic_dir}/latest.jpg"
ln -s "${image_offset}/$newn" "${comic_dir}/latest.jpg"