summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/pdfjam/pdfpun
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts/pdfjam/pdfpun')
-rwxr-xr-xMaster/texmf-dist/scripts/pdfjam/pdfpun17
1 files changed, 9 insertions, 8 deletions
diff --git a/Master/texmf-dist/scripts/pdfjam/pdfpun b/Master/texmf-dist/scripts/pdfjam/pdfpun
index eee08a05d33..aea8ff87eec 100755
--- a/Master/texmf-dist/scripts/pdfjam/pdfpun
+++ b/Master/texmf-dist/scripts/pdfjam/pdfpun
@@ -5,13 +5,14 @@
##
## Author David Firth (http://go.warwick.ac.uk/dfirth)
##
-## This is a simple wrapper for (three runs of) pdfjam, version 2.01
+## This is a simple wrapper for (three runs of) pdfjam, version 2.05
##
##
E_USAGE=64 ## for a command line usage error
##
-for arg in "$@"; do
- case "$arg" in
+for arg
+do
+ case $arg in
--batch)
printf "pdfpun ERROR: the --batch option is not allowed\n" 1>&2;
exit "$E_USAGE" ;;
@@ -29,7 +30,7 @@ shift ;
##
## Some (very) minimal checking of the first argument:
##
-if test ! -e "$sourceFile" ;
+if test ! -f "$sourceFile" ;
then
printf "pdfpun ERROR: first argument must be a PDF file\n" ;
exit $E_USAGE ;
@@ -45,21 +46,21 @@ fi
## That's all the argument checking!
##
pageSpec="-" ## the default
-case "${1}" in
+case ${1} in
--* | "")
;;
*) ## a page spec was given
pageSpec="$1" ;
shift ;;
esac
-case "${1}" in
+case ${1} in
--outfile)
outFile="$2" ;
- shift 2 ;;
+ shift; shift ;;
*)
;;
esac
-if test "$outFile" = "" ;
+if test -z "$outFile" ;
then
printf "pdfpun ERROR: no output file specified\n" 1>&2 ;
exit "$E_USAGE" ;