#!/bin/sh

for APPDIR in $*
do
    if [ -d $APPDIR/lib/X11/fonts -a ! -h $APPDIR/lib/X11/fonts ]
    then
	for FONTGROUP in $APPDIR/lib/X11/fonts/*
	do
    	    if [ ! -d /usr/share/fonts/X11/$FONTGROUP ]
	    then
		mkdir -vp /usr/share/fonts/X11/`basename $FONTGROUP`
	    fi
    	    ln -sv $APPDIR/lib/X11/fonts/`basename $FONTGROUP`/* /usr/share/fonts/X11/`basename $FONTGROUP`/
	done
    fi
done
