From dc05a7c3c4b2329f6718cbd84cccce05e4107cad Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 20 Nov 2021 00:26:26 +0300 Subject: [PATCH] better error checking... Signed-off-by: Alex A. Naanou --- scripts/cls2tex.sh | 3 +-- scripts/make-images.sh | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/cls2tex.sh b/scripts/cls2tex.sh index a085ba5..3bcd9ce 100755 --- a/scripts/cls2tex.sh +++ b/scripts/cls2tex.sh @@ -60,10 +60,9 @@ while true ; do exit ;; -p|--prefix) + PREFIX=$2 shift - PREFIX=$1 shift - continue ;; # handle unknown options... diff --git a/scripts/make-images.sh b/scripts/make-images.sh index 9a352c6..7be3a53 100644 --- a/scripts/make-images.sh +++ b/scripts/make-images.sh @@ -177,6 +177,12 @@ while true ; do shift ;; + # handle unknown options... + -*|--*) + echo "Error: unknown option \"$1\"" + exit + ;; + *) break ;;