aboutsummaryrefslogtreecommitdiff
path: root/chinese/moettf
diff options
context:
space:
mode:
authorFoxfair Hu <foxfair@FreeBSD.org>1999-10-19 07:58:46 +0000
committerFoxfair Hu <foxfair@FreeBSD.org>1999-10-19 07:58:46 +0000
commit5c632b5f21c599af1fba1347fc05a234717ef115 (patch)
treefbc010e7ffe3dd022f48faccbfe33f6d542e5224 /chinese/moettf
parentfb7af6f1766c83887ef7dbb259707b9f147f4ca5 (diff)
downloadports-5c632b5f21c599af1fba1347fc05a234717ef115.tar.gz
ports-5c632b5f21c599af1fba1347fc05a234717ef115.zip
PR: 14392
Submitted by: Keith Jang <jtjang@gcn.net.tw> Fix a bug when install this port : fons.dir has an error.
Notes
Notes: svn path=/head/; revision=22520
Diffstat (limited to 'chinese/moettf')
-rw-r--r--chinese/moettf/pkg-install14
1 files changed, 10 insertions, 4 deletions
diff --git a/chinese/moettf/pkg-install b/chinese/moettf/pkg-install
index 82408268116e..53514e6b0782 100644
--- a/chinese/moettf/pkg-install
+++ b/chinese/moettf/pkg-install
@@ -9,11 +9,18 @@ cd ${FONTDIR}
echo "Updating fonts.dir & fonts.alias. This may take a while..."
# Update fonts.dir
touch fonts.dir
-sed -e '/-moe-/d' -e '/-twmoe-/d' fonts.dir > fonts.dir.tmp
+sed -e '/ -moe-/d' -e '/ -twmoe-/d' fonts.dir > fonts.dir.tmp
# Add 12 new fonts
numfonts=$(echo $(cat fonts.dir.tmp |wc -l) - 1 + 12 |bc)
-echo ${numfonts} > fonts.dir
-sed -e 1d fonts.dir.tmp >> fonts.dir
+if [ ${numfonts} -le 12 ]; then # fonts.dir.tmp is empty
+ echo 12 > fonts.dir
+else
+ echo ${numfonts} > fonts.dir
+ sed -e 1d fonts.dir.tmp >> fonts.dir
+fi
+rm -f fonts.dir.tmp
+
+# Write font information to fonts.dir
for FAMILY in kai lishu sung
do
echo moe_${FAMILY}.ttf -twmoe-${FAMILY}-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
@@ -21,7 +28,6 @@ do
echo ai=0.3:moe_${FAMILY}.ttf -twmoe-${FAMILY}-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
echo ab=y:ai=0.3:moe_${FAMILY}.ttf -twmoe-${FAMILY}-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
done
-rm -f fonts.dir.tmp
# Update fonts.alias, font size ranges from 8 to 128.
SIZE=8