#! /bin/sh

# $ApsCVS: src/apsfilter/tools/uppdescr,v 1.3 2000/04/23 12:49:16 andreas Exp $

# get description from upp file
# for printersupport file

TMPFILE=$(mktemp 2>/dev/null /tmp/uppdescr.XXXXXX || echo /tmp/uppdescr.$$)

if [ -n "$1" ]
then
	UPPDIR=$1
else
	UPPDIR=/usr/local/share/ghostscript/*/lib
fi

cd $UPPDIR

for i in *.upp
do
	echo "`egrep "\-supModel" $i \
	| sed 's/-supModel=\"//' \
	| sed 's/\"$//'`|$i" \
	>> $TMPFILE
done
sort < $TMPFILE
rm -f $TMPFILE
