summaryrefslogtreecommitdiffstats
path: root/bin/comics/dilbert
diff options
context:
space:
mode:
Diffstat (limited to 'bin/comics/dilbert')
-rwxr-xr-xbin/comics/dilbert4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/comics/dilbert b/bin/comics/dilbert
index 32689ec..1771658 100755
--- a/bin/comics/dilbert
+++ b/bin/comics/dilbert
@@ -11,7 +11,7 @@ newn="${day}.gif"
wget ${wget_args} --user-agent="$browser" "$webaddress"
-if [ -e index.html ]; then
+if [ -s index.html ]; then
nomen=$(grep -A1 "strips/comic/$(date -d"$daysago days ago" -I)" index.html | \
sed -n 's#.*<img.*src="\(http://[^"]\+\)".*#\1#p' | tail -1)
gifname=$(sed 's#.*/\([^/]\+\)$#\1#' <<< $nomen)
@@ -23,7 +23,7 @@ if [ -e index.html ]; then
echo
wget ${wget_args} --user-agent="$browser" "$nomen"
- if [ -e "${tmp}/${gifname}" ]; then
+ if [ -s "${tmp}/${gifname}" ]; then
mv "${tmp}/${gifname}" "${image_dir}/$newn"
rm -f "${comic_dir}/latest.gif"
ln -s "${image_offset}/$newn" "${comic_dir}/latest.gif"