From 715859f24488523526a4d7a332b6086a0c4905e8 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 6 Jul 2009 16:19:38 +0200 Subject: rrad: Bail out if something went wrong --- etc/functions/rrad | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3