mirror of
https://github.com/flynx/photobook.git
synced 2025-10-29 10:20:08 +00:00
several fixes and some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e2fb80991f
commit
32e28dae00
@ -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
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user