]> git.donarmstrong.com Git - bin.git/blob - ps2ai
add common subscriber
[bin.git] / ps2ai
1 #!/bin/sh
2 # $RCSfile: ps2epsi,v $ $Revision: 1.4.2.2 $
3
4 if [ $# -lt 1 -o $# -gt 2 ]; then
5         echo "Usage: `basename $0` file.ps [file.ai]" 1>&2
6         exit 1
7 fi
8
9 infile=$1;
10
11 if [ $# -eq 1 ]
12 then
13         case "${infile}" in
14           *.ps)         base=`basename ${infile} .ps` ;;
15           *.cps)        base=`basename ${infile} .cps` ;;
16           *.eps)        base=`basename ${infile} .eps` ;;
17           *.epsf)       base=`basename ${infile} .epsf` ;;
18           *)            base=`basename ${infile}` ;;
19         esac
20         outfile=$( echo "${infile}"|perl -pe 's/\.[^\.]+$//').ai
21 else
22         outfile=$2
23 fi
24
25 gs -q -dNODISPLAY ps2ai.ps <${infile} > $outfile
26
27 exit 0