From 1451624bd458ba3152d88b28a103da914510ec20 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 6 Jun 2012 02:21:59 +0200 Subject: [PATCH] Some error handling --- mkmap.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mkmap.sh b/mkmap.sh index e0f00cc..cd64d42 100755 --- a/mkmap.sh +++ b/mkmap.sh @@ -1,8 +1,13 @@ #!/bin/bash +set -e + DEST=$1 +[ "$DEST" ] || exit 1 + + GWL=`batctl gwl -n` SELF=`echo "$GWL" | head -n 1 | sed -r -e 's@^.*MainIF/MAC: [^/]+/([0-9a-f:]+).*$@\1@'`