summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-06 16:19:38 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-06 16:19:38 +0200
commit715859f24488523526a4d7a332b6086a0c4905e8 (patch)
tree1896fe077e656733828d8858bb2578722e004b5d
parentc6e8b3d63dde4798ba41a90dd3236023e0ac4c62 (diff)
rrad: Bail out if something went wrong
-rwxr-xr-xetc/functions/rrad6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/functions/rrad b/etc/functions/rrad
index 21cda6d..195ceb3 100755
--- a/etc/functions/rrad
+++ b/etc/functions/rrad
@@ -4,5 +4,11 @@ typeset url=$(printf http://www.wetteronline.de/daten/radar/dnrw/%s/std_%02d%02d
typeset file=$(mktemp /tmp/rrad.XXXXXXX)
curl -s $url > $file
+
+if [[ ${$(du -b $file)[1]} == 0 ]] {
+ echo "Error"
+ return 1
+}
+
mplayer -loop 0 $file
rm $file