summaryrefslogtreecommitdiffstats
path: root/bin/pdfcat
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pdfcat')
-rwxr-xr-xbin/pdfcat8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/pdfcat b/bin/pdfcat
index 663f0af..ff4edaa 100755
--- a/bin/pdfcat
+++ b/bin/pdfcat
@@ -1,5 +1,7 @@
-#!/bin/bash
+#!/bin/sh
+set -eu
+set -o pipefail
-local out=$1
+out="$1"
shift
-gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out $*
+gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="$out" "$@"