ps2ps2 560 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. # $Id: ps2ps2,v 1.1 2005/07/20 06:00:54 igor Exp $
  3. # "Distill" PostScript.
  4. # This definition is changed on install to match the
  5. # executable name set in the makefile
  6. GS_EXECUTABLE=gs
  7. OPTIONS="-dSAFER"
  8. while true
  9. do
  10. case "$1" in
  11. -*) OPTIONS="$OPTIONS $1" ;;
  12. *) break ;;
  13. esac
  14. shift
  15. done
  16. if [ $# -ne 2 ]; then
  17. echo "Usage: `basename $0` [options] input.ps output.ps" 1>&2
  18. echo " e.g. `basename $0` -sPAPERSIZE=a4 input.ps output.ps" 1>&2
  19. exit 1
  20. fi
  21. exec $GS_EXECUTABLE -q -sDEVICE=ps2write "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"