1#!/bin/sh
2# "Distill" Encapsulated PostScript.
3
4# This definition is changed on install to match the
5# executable name set in the makefile
6GS_EXECUTABLE=gs
7gs="`dirname \"$0\"`/$GS_EXECUTABLE"
8if test ! -x "$gs"; then
9	gs="$GS_EXECUTABLE"
10fi
11GS_EXECUTABLE="$gs"
12
13OPTIONS="-dDEVICEWIDTH=250000 -dDEVICEHEIGHT=250000"
14while true
15do
16	case "$1" in
17	-?*) OPTIONS="$OPTIONS $1" ;;
18	*)  break ;;
19	esac
20	shift
21done
22
23if [ $# -ne 2 ]; then
24	echo "Usage: `basename \"$0\"` ...switches... input.eps output.eps" 1>&2
25	exit 1
26fi
27
28exec "$GS_EXECUTABLE" -q -sDEVICE=eps2write -sstdout=%stderr "-sOutputFile=$2" -dNOPAUSE -dBATCH -P- -dSAFER $OPTIONS "$1"
29