several fixes and some cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-04-13 11:37:45 +03:00
parent e2fb80991f
commit 32e28dae00
2 changed files with 13 additions and 11 deletions

View File

@ -54,13 +54,6 @@ printhelp(){
echo " in both the repo and in installed form, so .dtx is not used." echo " in both the repo and in installed form, so .dtx is not used."
} }
# Usage: printerror MESSAGE...
printerror(){
echo Error: $@
echo
printusage
}
# Usage: printmsg TEXT # Usage: printmsg TEXT
printmsg(){ printmsg(){
# print message... # print message...
@ -88,21 +81,23 @@ while true ; do
;; ;;
-p|--prefix) -p|--prefix)
PREFIX=$2 PREFIX=$2
shift shift 2
shift continue
;; ;;
-s|--strip) -s|--strip)
STRIP_DOC=1 STRIP_DOC=1
shift shift
continue
;; ;;
-n|--no-msg) -n|--no-msg)
NO_MSG=1 NO_MSG=1
shift shift
continue
;; ;;
# handle unknown options... # handle unknown options...
-*|--*) -*|--*)
printerror "unknown option \"$1\"" echo "Error: unknown option: \"$1\"" >&2
exit exit
;; ;;

View File

@ -177,38 +177,45 @@ while true ; do
-a|--annotate) -a|--annotate)
ANOTATE_IMAGE_PATHS=1 ANOTATE_IMAGE_PATHS=1
shift shift
continue
;; ;;
-c) -c)
$CONFIG="$2" $CONFIG="$2"
[ -e "$CONFIG" ] \ [ -e "$CONFIG" ] \
&& source "$CONFIG" && source "$CONFIG"
shift 2 shift 2
continue
;; ;;
--templates) --templates)
TEMPLATE_DIR=$2 TEMPLATE_DIR=$2
shift 2 shift 2
continue
;; ;;
--single-image-tpl) --single-image-tpl)
IMAGE_SPREAD[1]=$2 IMAGE_SPREAD[1]=$2
shift 2 shift 2
continue
;; ;;
--double-image-tpl) --double-image-tpl)
IMAGE_SPREAD[2]=$2 IMAGE_SPREAD[2]=$2
shift 2 shift 2
continue
;; ;;
--text-spread-tpl) --text-spread-tpl)
IMAGE_SPREAD[0]=$2 IMAGE_SPREAD[0]=$2
shift 2 shift 2
continue
;; ;;
--captions) --captions)
CAPTION_DIR=$2 CAPTION_DIR=$2
shift 2 shift 2
continue
;; ;;
# handle unknown options... # handle unknown options...
-*|--*) -*|--*)
echo "Error: unknown option \"$1\"" echo "Error: unknown option \"$1\"" >&2
exit exit
;; ;;