From: Michael Prokop Date: Tue, 23 Apr 2013 13:15:10 +0000 (+0200) Subject: grml2iso: make sure to exit properly if provided argument to -c option does not exist X-Git-Tag: v0.13.6~4 X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=9e7a48deb5c2046c7087e1f998748914b01b12be grml2iso: make sure to exit properly if provided argument to -c option does not exist Otherwise we're hiding the actual error message. --- 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");;