diff options
-rwxr-xr-x | dir-to-pdf.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dir-to-pdf.sh b/dir-to-pdf.sh index a0dc95f..83d2ab3 100755 --- a/dir-to-pdf.sh +++ b/dir-to-pdf.sh @@ -44,9 +44,10 @@ if ! test -d "$1"; then fi if test $# -eq 2 ; then - outfile=`echo "$2" | sed 's/\/$//'` + outfile="$2" else - outfile="$1.pdf" + o=`echo "$1" | sed 's/\/$//'` + outfile="$o.pdf" fi tmpdir=`mktemp -d` |