diff options
Diffstat (limited to 'localpdfpreflight')
-rwxr-xr-x | localpdfpreflight | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/localpdfpreflight b/localpdfpreflight new file mode 100755 index 0000000..146e523 --- /dev/null +++ b/localpdfpreflight @@ -0,0 +1,30 @@ +#!/bin/sh +# +# /usr/local/bin/localpdfpreflight +# Copyright 2014 Jonas Smedegaard <dr@jones.dk> +# +# Examine use of color +# + +set -eu + +PRG="$(basename "$0")" + +showhelp() { + cat <<EOF +Usage: $PRG INFILE + +EOF +} + +exit1() { + echo >&2 "ERROR: $1" + exit 1 +} + +if [ $# -eq 0 ]; then + showhelp + exit1 "Input file missing" +fi + +gs -dSAFER -dNOPAUSE -dBATCH -o- -sDEVICE=inkcov -- "$1" |