:
# 1.2 89/08/25
trap "exit 1" 0 1 2 3 15
if [ ! -d /usr/lib/oldfonts ]
then
    if mkdir /usr/lib/oldfonts
    then
	:
    else
	exit 1
    fi
    cp /usr/lib/font/* /usr/lib/oldfonts
fi
set -e
rm -f /tmp/S
cp font/S /tmp/S
chmod 644 /tmp/S
sed -e '1,/charset/d' font/S2 >> /tmp/S
for i in font/[A-Z]*
do
    case $i in
	font/S)
	    echo "Generating font S"
	    ./dit2catwid -s /tmp/S font/R font/ftS
	    ;;
	font/S2)
	    continue
	    ;;
	*)
	    echo "Generating font `basename $i`"
	    ./dit2catwid /tmp/S $i font/ft`basename $i`
	    ;;
    esac
done
set -ex
mv font/ft* /usr/lib/font
trap "" 0
exit 0
