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."
}
# Usage: printerror MESSAGE...
printerror(){
echo Error: $@
echo
printusage
}
# Usage: printmsg TEXT
printmsg(){
# print message...
@ -88,21 +81,23 @@ while true ; do
;;
-p|--prefix)
PREFIX=$2
shift
shift
shift 2
continue
;;
-s|--strip)
STRIP_DOC=1
shift
continue
;;
-n|--no-msg)
NO_MSG=1
shift
continue
;;
# handle unknown options...
-*|--*)
printerror "unknown option \"$1\""
echo "Error: unknown option: \"$1\"" >&2
exit
;;

View File

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