ps2ps 373 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # $Id: ps2ps,v 1.3 2001/06/22 16:09:22 lpd Exp $
  3. # "Distill" PostScript.
  4. OPTIONS="-dSAFER"
  5. while true
  6. do
  7. case "$1" in
  8. -*) OPTIONS="$OPTIONS $1" ;;
  9. *) break ;;
  10. esac
  11. shift
  12. done
  13. if [ $# -ne 2 ]; then
  14. echo "Usage: `basename $0` ...switches... input.ps output.ps" 1>&2
  15. exit 1
  16. fi
  17. exec gs -q -sDEVICE=pswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"