simplify destination dir option
authorfpunktk <git@fpunktk.de>
Sat, 30 Dec 2017 11:26:11 +0000 (12:26 +0100)
committerfpunktk <git@fpunktk.de>
Sat, 30 Dec 2017 11:26:11 +0000 (12:26 +0100)
anondcim

index aa690a8c7856d503d5cda777b01a5ab11c000225..027ccc6822823be3931925eb07f0a070fd9c1ab4 100755 (executable)
--- a/anondcim
+++ b/anondcim
@@ -53,8 +53,8 @@ do
             dst_size="$OPTARG"
         ;;
         "d")
-            # enforce a trailing "/"
-            [ -d "${OPTARG%/}/" ] && dst_dir="${OPTARG%/}/" || die "destination directory \"${OPTARG%/}/\" does not exist"
+            dst_dir="${OPTARG%/}/" # enforce a trailing "/"
+            [ -d "$dst_dir" ] || die "destination directory \"$dst_dir\" does not exist"
         ;;
         *)
             err "not recognised: OPTION=$OPTION, OPTARG=$OPTARG"