xref: /plan9/sys/src/cmd/gs/lib/ps2ps.cmd (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1/* $Id: ps2ps.cmd,v 1.3 2002/02/21 21:49:28 giles 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
7/* "Distill" PostScript. */
8
9parse arg params
10
11gs='@gsos2'
12
13if params='' then call usage
14
15options='-dNOPAUSE -dBATCH'
16
17/* extract options from command line */
18i=1
19param=word(params,i)
20do while substr(param,1,1)='-'
21	options=options param
22	i=i+1
23	param=word(params,i)
24end
25
26infile=param
27if infile='' then call usage
28outfile=word(params,i+1)
29if outfile='' then call usage
30
31gs '-q -sDEVICE=pswrite -sOutputFile='outfile options infile
32exit
33
34usage:
35say 'Usage: ps2ps ...switches... input.ps output.ps'
36exit
37