summaryrefslogtreecommitdiff
path: root/localpdfpreflight
blob: 146e5235843b82134522fec3e44a64ea939fa66e (plain)
  1. #!/bin/sh
  2. #
  3. # /usr/local/bin/localpdfpreflight
  4. # Copyright 2014 Jonas Smedegaard <dr@jones.dk>
  5. #
  6. # Examine use of color
  7. #
  8. set -eu
  9. PRG="$(basename "$0")"
  10. showhelp() {
  11. cat <<EOF
  12. Usage: $PRG INFILE
  13. EOF
  14. }
  15. exit1() {
  16. echo >&2 "ERROR: $1"
  17. exit 1
  18. }
  19. if [ $# -eq 0 ]; then
  20. showhelp
  21. exit1 "Input file missing"
  22. fi
  23. gs -dSAFER -dNOPAUSE -dBATCH -o- -sDEVICE=inkcov -- "$1"