You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
647 B

1 month ago
  1. #!/bin/sh
  2. # "Distill" PostScript.
  3. # This definition is changed on install to match the
  4. # executable name set in the makefile
  5. GS_EXECUTABLE=gs
  6. gs="`dirname \"$0\"`/$GS_EXECUTABLE"
  7. if test ! -x "$gs"; then
  8. gs="$GS_EXECUTABLE"
  9. fi
  10. GS_EXECUTABLE="$gs"
  11. OPTIONS="-P- -dSAFER"
  12. while true
  13. do
  14. case "$1" in
  15. -?*) OPTIONS="$OPTIONS $1" ;;
  16. *) break ;;
  17. esac
  18. shift
  19. done
  20. if [ $# -ne 2 ]; then
  21. echo "Usage: `basename \"$0\"` [options] input.ps output.ps" 1>&2
  22. echo " e.g. `basename \"$0\"` -sPAPERSIZE=a4 input.ps output.ps" 1>&2
  23. exit 1
  24. fi
  25. exec "$GS_EXECUTABLE" -q -sDEVICE=ps2write -sstdout=%stderr "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"