ps2ps2.cmd 697 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* $Id: ps2ps2.cmd,v 1.1 2005/07/20 06:00:54 igor Exp $ */
  2. /*
  3. * This file is maintained by a user: if you have any questions about it,
  4. * please contact Mark Hale (mark.hale@physics.org).
  5. */
  6. /* "Distill" PostScript. */
  7. parse arg params
  8. gs='@gsos2'
  9. if params='' then call usage
  10. options='-dNOPAUSE -dBATCH'
  11. /* extract options from command line */
  12. i=1
  13. param=word(params,i)
  14. do while substr(param,1,1)='-'
  15. options=options param
  16. i=i+1
  17. param=word(params,i)
  18. end
  19. infile=param
  20. if infile='' then call usage
  21. outfile=word(params,i+1)
  22. if outfile='' then call usage
  23. gs '-q -sDEVICE=ps2write -sOutputFile='outfile options infile
  24. exit
  25. usage:
  26. say 'Usage: ps2ps ...switches... input.ps output.ps'
  27. exit