Commit 75e2e20e authored by Fred Drake's avatar Fred Drake

Improved some error messages for command line processing.

Added --all to produce all formats at once.
parent 8ec7b5a1
...@@ -40,7 +40,7 @@ Options specifying formats to build: ...@@ -40,7 +40,7 @@ Options specifying formats to build:
--dvi "DeVice Indepentent" format from TeX --dvi "DeVice Indepentent" format from TeX
--text ASCII text --text ASCII text
More than one output format may be specified. More than one output format may be specified, or --all.
HTML options: HTML options:
--address, -a Specify an address for page footers. --address, -a Specify an address for page footers.
...@@ -59,6 +59,10 @@ Other options: ...@@ -59,6 +59,10 @@ Other options:
(stderr is also lost, sorry; see *.how for errors) (stderr is also lost, sorry; see *.how for errors)
EOF EOF
if [ "$2" ] ; then
echo "$2"
echo
fi
exit $1 exit $1
} }
...@@ -159,6 +163,15 @@ cleanup() { ...@@ -159,6 +163,15 @@ cleanup() {
# figure out what our targets are: # figure out what our targets are:
while [ "$1" ] ; do while [ "$1" ] ; do
case "$1" in case "$1" in
--all|--al)
BUILD_PDF=true
BUILD_PS=true
BUILD_DVI=true
BUILD_HTML=true
BUILD_TEXT=true
USE_DEFAULT_FORMAT=false
shift 1
;;
--pdf|--pd) --pdf|--pd)
BUILD_PDF=true BUILD_PDF=true
USE_DEFAULT_FORMAT=false USE_DEFAULT_FORMAT=false
...@@ -243,8 +256,10 @@ if [ $# = 0 ] ; then ...@@ -243,8 +256,10 @@ if [ $# = 0 ] ; then
COUNT=`ls -1 *.tex | wc -l | sed 's/[ ]//g'` COUNT=`ls -1 *.tex | wc -l | sed 's/[ ]//g'`
if [ "$COUNT" -eq 1 ] ; then if [ "$COUNT" -eq 1 ] ; then
set -- `ls -1 *.tex` set -- `ls -1 *.tex`
elif [ "$COUNT" -gt 1 ] ; then
usage 2 "Could not deduce which file(s) to process as HOWTO documents."
else else
usage 2 usage 2 "No file to process."
fi fi
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment