Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

beta 19 cannot run this script



I had to link /bin/sh to zsh in order to make automatic tex font
generation work. However, zsh (called as sh), doesn't run this script:

#! /bin/sh

# apsfilter 4.9
# by Andreas Klemm
# Mon Feb  6 19:54:12 MET 1995

SUPPORTED_FILTERS="\
	gs \
	dvips \
	a2ps \
	ras2ps \
	giftoppm \
	pnmtops \
	ppmtopgm \
	fig2dev \
	rasttopnm \
	tifftopnm \
	gzip \
	compress \
	pack \
	djpeg \
	melt \
	"

# are we called by SETUP or are we standalone ?
# if standalone, then grab APS_BASEDIR from /etc/printcap file
if [ ! $APS_BASEDIR ]; then
	APS_BASEDIR=`grep APS_BASEDIR /etc/printcap | cut -d ':' -f 2`
	export APS_BASEDIR
fi

. $APS_BASEDIR/global/GLOBAL.sh


echo "cleaning global config file..."
if [ -f $FILTERS_FOUND ]; then
	: > $FILTERS_FOUND
fi

# extract searchpatch for find from PATH
SEARCHPATH=`echo $PATH | sed -e "s/:/\ /g"`

echo "looking for available filter programs on this system..."
for filter in $SUPPORTED_FILTERS
do
	FILTER=`echo $filter | tr 'a-z' 'A-Z'`
	for path in $SEARCHPATH
	do
		if [ -f $path/$filter ]
		then
			set HAVE_$FILTER="True" \
				&& echo "found filter $filter" \
				&& echo "HAVE_$FILTER=True" >> $FILTERS_FOUND
		fi
	done
done

if [ -f $FILTERS_FOUND ]; then
    sort < $FILTERS_FOUND | uniq > /tmp/apsfilterrc.$$
    mv /tmp/apsfilterrc.$$ $FILTERS_FOUND
else
    # a system without special filter
    echo "# no supported filters found during filtersetup ?!" >> $FILTERS_FOUND
    echo "# if you suppose to add filters like dvips, gs,..." >> $FILTERS_FOUND
    echo "# later, then run $APS_BASEDIR/setup/filtersetup  " >> $FILTERS_FOUND
    echo "# again !					    " >> $FILTERS_FOUND
    # mail the poor result !!!
    cat $FILTERS_FOUND | $MAIL root > /dev/null 2>&1
fi


The error is:

./filtersetup: [: argument expected [40]
/global/GLOBAL.sh: .: no such file or directory: /global/GLOBAL.sh [45]
cleaning global config file...
./filtersetup: [: argument expected [49]
looking for available filter programs on this system...
found filter gs
./filtersetup: no such file or directory:  [66]
./filtersetup: [: argument expected [71]

Carlos




Messages sorted by: Reverse Date, Date, Thread, Author