home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / bin / ps2ps < prev    next >
Encoding:
Text File  |  2005-11-16  |  497 b   |  26 lines

  1. #!/bin/sh
  2. # $Id: ps2ps,v 1.6 2002/10/24 14:23:15 giles Exp $
  3. # "Distill" PostScript.
  4. gs="`dirname $0`/gs"
  5. if test ! -x "$gs"; then
  6.     gs=gs
  7. fi
  8.  
  9. OPTIONS="-dSAFER"
  10. while true
  11. do
  12.     case "$1" in
  13.     -*) OPTIONS="$OPTIONS $1" ;;
  14.     *)  break ;;
  15.     esac
  16.     shift
  17. done
  18.  
  19. if [ $# -ne 2 ]; then
  20.     echo "Usage: `basename $0` [options] input.ps output.ps" 1>&2
  21.     echo "  e.g. `basename $0` -sPAPERSIZE=a4 input.ps output.ps" 1>&2
  22.     exit 1
  23. fi
  24.  
  25. exec "$gs" -q -sDEVICE=pswrite "-sOutputFile=$2" -dNOPAUSE -dBATCH $OPTIONS "$1"
  26.