summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-06-03 09:48:21 +0100
committerNick White <git@njw.name>2019-06-03 09:48:21 +0100
commitd74a5297cffb867e64309451dd0cc526d2ebc3a2 (patch)
treefe1d08db205213fc677e3d7195ea39dcb9764168
parentf5c119a9a8040bd42de908eebcbe2f68ce85c11b (diff)
Fix dir-to-pdf output naming
-rwxr-xr-xdir-to-pdf.sh5
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`