From 9e7a48deb5c2046c7087e1f998748914b01b12be Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 23 Apr 2013 15:15:10 +0200 Subject: [PATCH] grml2iso: make sure to exit properly if provided argument to -c option does not exist Otherwise we're hiding the actual error message. --- grml2iso | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grml2iso b/grml2iso index 0addfb7..8f4d7b8 100755 --- a/grml2iso +++ b/grml2iso @@ -86,7 +86,7 @@ Options: case $name in o) ISOFILE="$OPTARG";; b) GRML2USB_OPTS+=(--bootoptions="$OPTARG");; - c) DIR="$(readlink -f "$OPTARG")";; + c) DIR="$(readlink -f "$OPTARG")"; [ -n "$DIR" ] || { echo "Could not read $OPTARG - exiting" >&2 ; exit 1 ; } ;; f) FORCE='true';; r) GRML2USB_OPTS+=(--remove-bootoption="$OPTARG");; p) GRML2USB_OPTS+=("$OPTARG");; -- 2.1.4