SOURCES: fontpostinst - be more verbose on what's happening

arekm arekm at pld-linux.org
Wed Nov 14 10:14:23 CET 2007


Author: arekm                        Date: Wed Nov 14 09:14:23 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- be more verbose on what's happening

---- Files affected:
SOURCES:
   fontpostinst (1.13 -> 1.14) 

---- Diffs:

================================================================
Index: SOURCES/fontpostinst
diff -u SOURCES/fontpostinst:1.13 SOURCES/fontpostinst:1.14
--- SOURCES/fontpostinst:1.13	Tue Apr  4 09:36:42 2006
+++ SOURCES/fontpostinst	Wed Nov 14 10:14:17 2007
@@ -12,6 +12,8 @@
 #	gnome-font-install (gnome-print)
 #	t1libconfig (t1lib)
 
+PROGRAM=${0##*/}
+
 FBASEDIR="/usr/share/fonts"
 
 MKFONTDIRBIN="/usr/bin/mkfontdir"
@@ -54,10 +56,10 @@
 T1LIBCONFIG="$T1LIBCONFIGBIN --force"
 
 if [ -z "$1" ]; then
-	echo "Usage: fontpostinst TYPE [DIR]"
-	echo "  TYPE is one of:"
-	echo "    OTF, TTF, Type1, misc, 100dpi, 75dpi, cyrillic, local, CID, Speedo, PEX"
-	echo "  default DIR is $FBASEDIR/TYPE"
+	echo >&2 "Usage: $PROGRAM TYPE [DIR]"
+	echo >&2 "  TYPE is one of:"
+	echo >&2 "    OTF, TTF, Type1, misc, 100dpi, 75dpi, cyrillic, local, CID, Speedo, PEX"
+	echo >&2 "  default DIR is $FBASEDIR/TYPE"
 	exit 1
 fi
 
@@ -75,21 +77,26 @@
 elif [ -f fonts.alias ]; then
 	mv -f fonts.alias fonts.alias-save
 fi
+echo >&2 "$PROGRAM: Updating for $FTYPE..."
 case "$FTYPE" in
     OTF|TTF)
 	if [ -x $MKTTFFONTSCALEBIN ]; then
+		echo >&2 "$PROGRAM: Running $MKTTFFONTSCALEBIN."
 		$MKTTFFONTSCALE
 	fi
 	if [ -x $MKFONTDIRBIN ]; then
+		echo >&2 "$PROGRAM: Running $MKFONTDIRBIN."
 		$MKFONTDIR
 	fi
 	if [ -x $FCCACHEBIN ]; then
+		echo >&2 "$PROGRAM: Running $FCCACHEBIN."
 		$FCCACHE
 	fi
 	;;
     Type1)
 	rm -f fonts.scale.bak Fontmap.bak
 	if [ "`echo fonts.scale.*`" != 'fonts.scale.*' ]; then
+		echo >&2 "$PROGRAM: Merging fonts.scale.* files."
 		cat fonts.scale.* 2>/dev/null | LC_ALL=C sort -u > fonts.scale.tmp
 		cat fonts.scale.tmp | wc -l | tr -d ' ' > fonts.scale
 		cat fonts.scale.tmp >> fonts.scale
@@ -97,31 +104,38 @@
 	elif [ "`echo *.pf[ab]`" != '*.pf[ab]' ]; then
 		# no hints - try to generate
 		if [ -x $MKFONTSCALEBIN ]; then
+			echo >&2 "$PROGRAM: Running $MKFONTSCALEBIN."
 			$MKFONTSCALE
 		fi
 	elif [ -f fonts.scale ]; then
 		mv -f fonts.scale fonts.scale-save
 	fi
 	if [ -x $MKFONTDIRBIN ]; then
+		echo >&2 "$PROGRAM: Running $MKFONTDIRBIN."
 		$MKFONTDIR
 	fi
 	if [ -x $FCCACHEBIN ]; then
+		echo >&2 "$PROGRAM: Running $FCCACHEBIN."
 		$FCCACHE
 	fi
 	if [ "`echo Fontmap.*`" != 'Fontmap.*' ]; then
+		echo >&2 "$PROGRAM: Merging Fontmap.* files."
 		cat Fontmap.* > Fontmap
 	elif [ -f Fontmap ]; then
 		mv -f Fontmap Fontmap-save
 	fi
 	if [ -x $GNOMEFONTINSTBIN ]; then
+		echo >&2 "$PROGRAM: Running $GNOMEFONTINSTBIN."
 		$GNOMEFONTINST
 	fi
 	if [ -x $T1LIBCONFIGBIN ]; then
+		echo >&2 "$PROGRAM: Running $T1LIBCONFIGBIN."
 		$T1LIBCONFIG
 	fi
 	;;
     CID|Speedo)
 	if [ "`echo fonts.scale.*`" != 'fonts.scale.*' ]; then
+		echo >&2 "$PROGRAM: Merging fonts.scale.* files."
 		cat fonts.scale.* 2>/dev/null | LC_ALL=C sort -u > fonts.scale.tmp
 		cat fonts.scale.tmp | wc -l | tr -d ' ' > fonts.scale
 		cat fonts.scale.tmp >> fonts.scale
@@ -130,12 +144,14 @@
 		mv -f fonts.scale fonts.scale-save
 	fi
 	if [ -x $MKFONTDIRBIN ]; then
+		echo >&2 "$PROGRAM: Running $MKFONTDIRBIN."
 		$MKFONTDIR
 	fi
 	;;
     misc)
 	# special case - fonts needed for X server to start
 	if [ -x $MKFONTDIRBIN ]; then
+		echo >&2 "$PROGRAM: Running $MKFONTDIRBIN."
 		$MKFONTDIR
 	elif [ -f 6x13-ISO8859-1.pcf.gz -a -f cursor.pcf.gz ]; then
 		cat > fonts.dir <<EOF
@@ -145,14 +161,17 @@
 EOF
 	fi
 	if [ -x $FCCACHEBIN ]; then
+		echo >&2 "$PROGRAM: Running $FCCACHEBIN."
 		$FCCACHE
 	fi
 	;;
     100dpi|75dpi|cyrillic|local)
 	if [ -x $MKFONTDIRBIN ]; then
+		echo >&2 "$PROGRAM: Running $MKFONTDIRBIN."
 		$MKFONTDIR
 	fi
 	if [ -x $FCCACHEBIN ]; then
+		echo >&2 "$PROGRAM: Running $FCCACHEBIN."
 		$FCCACHE
 	fi
 	;;
@@ -161,6 +180,7 @@
     *)
 	echo "Warning: \"$FTYPE\": unknown font type!" >&2
 	if [ -x $MKFONTDIRBIN ]; then
+		echo >&2 "$PROGRAM: Running $MKFONTDIRBIN."
 		$MKFONTDIR
 	fi
 esac
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/fontpostinst?r1=1.13&r2=1.14&f=u



More information about the pld-cvs-commit mailing list