#!/bin/sh # $RCSfile: ps2epsi,v $ $Revision: 1.4.2.2 $ if [ $# -lt 1 -o $# -gt 2 ]; then echo "Usage: `basename $0` file.ps [file.ai]" 1>&2 exit 1 fi infile=$1; if [ $# -eq 1 ] then case "${infile}" in *.ps) base=`basename ${infile} .ps` ;; *.cps) base=`basename ${infile} .cps` ;; *.eps) base=`basename ${infile} .eps` ;; *.epsf) base=`basename ${infile} .epsf` ;; *) base=`basename ${infile}` ;; esac outfile=$( echo "${infile}"|perl -pe 's/\.[^\.]+$//').ai else outfile=$2 fi gs -q -dNODISPLAY ps2ai.ps <${infile} > $outfile exit 0