5 echo "usage: $0 [font directory, defaults to \$QTDIR/lib/fonts]"
22 family=`echo $base|cut -d_ -f1`
23 pt=`echo $base|cut -d_ -f2`
24 weight=`echo $base|cut -d_ -f3|sed -e 's,i$,,'`
25 if (echo $base|cut -d_ -f3|grep -q 'i$'); then
30 echo "$family $base.qpf QPF $italic $weight $pt u"
33 if [ "$1" = "-f" ]; then
41 if [ -n "$QTDIR" ]; then
42 fontdir=$QTDIR/lib/fonts
44 fontdir=/opt/QtPalmtop/lib/fonts
50 if ! [ -d $fontdir ]; then
51 echo Error: $fontdir not a directory
55 if [ -e $fontdir/fontdir ]; then
56 if find $fontdir -newer $fontdir/fontdir | grep -q "\(qpf\|ttf\)"; then
57 #echo "fontdir needs updating..."
59 elif [ "$FORCE" = "0" ]; then
60 #echo "fontdir already up to date - exiting"
63 cat $fontdir/fontdir | grep -v '\.qpf' > $fontdir/fontdir.new
67 for file in `ls $fontdir/*.qpf 2>/dev/null |sed -e's,\.qpf$,,; s,_t[^_]*$,,;'|sort -u`; do
70 ) >> $fontdir/fontdir.new
72 mv $fontdir/fontdir.new $fontdir/fontdir