12345678910111213141516171819202122232425262728293031323334353637383940414243 |
-
-
-
-
-
-
-
- parse arg params
-
- gs='@gsos2'
- inext='.ps'
- outext='.pdf'
-
- if params='' then call usage
-
- options=''
-
-
- i=1
- param=word(params,i)
- do while substr(param,1,1)='-'
- options=options param
- i=i+1
- param=word(params,i)
- end
-
- infile=param
- if infile='' then call usage
- outfile=word(params,i+1)
- if outfile='' then do
- outfile=infile''outext
- infile=infile''inext
- end
-
- gs options '-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile='outfile options '-c save pop -f' infile
- exit
-
- usage:
- say 'Usage: ps2pdf [options...] input[.ps output.pdf]'
- exit
|