From 5cc722828d1314a5cb3aaf9c00f2f7cad1988c95 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 30 Apr 2010 18:17:54 +0000 Subject: pdfjam update git-svn-id: svn://tug.org/texlive/trunk@18056 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/pdfjam/pdfpun | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist/scripts/pdfjam/pdfpun') 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" ; -- cgit v1.2.3