#
# "@(#)postremove	35.1 94/09/01   Sun Microsystems" 
# SUNWxwoft (X Windows optional fonts package) post install/remove script.
#
# Rebuilds the fonts.dir files if mkfontdir exists otherwise does nothing
#

FONTINSTDIR=$BASEDIR/openwin/lib/X11/fonts
export FONTINSTDIR


if [ $BASEDIR != "/usr" ]; then 
	LD_LIBRARY_PATH=$BASEDIR/openwin/server/lib:$BASEDIR/openwin/lib 
	export LD_LIBRARY_PATH 
fi

if [ -x $BASEDIR/openwin/bin/mkfontdir ]; then
    for dir in 100dpi 75dpi F3 F3bitmaps Speedo Type1 Type1/outline misc Xt+
    do
	if [ -d $FONTINSTDIR/$dir ]; then
	  (
		cd $FONTINSTDIR/$dir
		$BASEDIR/openwin/bin/mkfontdir . || exit 2
		$BASEDIR/openwin/lib/installalias fonts.alias.req . 
	  )
	fi
    done
fi


exit 0

