aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/sazanami-ttf/pkg-deinstall
diff options
context:
space:
mode:
Diffstat (limited to 'japanese/sazanami-ttf/pkg-deinstall')
-rw-r--r--japanese/sazanami-ttf/pkg-deinstall15
1 files changed, 15 insertions, 0 deletions
diff --git a/japanese/sazanami-ttf/pkg-deinstall b/japanese/sazanami-ttf/pkg-deinstall
new file mode 100644
index 000000000000..2c3c37bd3dba
--- /dev/null
+++ b/japanese/sazanami-ttf/pkg-deinstall
@@ -0,0 +1,15 @@
+#!/bin/sh
+# $FreeBSD$
+
+if [ "$2" != "DEINSTALL" ]; then
+ exit 0
+fi
+FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
+cd ${FONTDIR}
+sed -e '/-sazanami-/d' fonts.dir > fonts.dir.tmp
+numfonts=$(echo $(cat fonts.dir.tmp | wc -l) - 1 | bc)
+echo ${numfonts} > fonts.dir
+sed -e 1d fonts.dir.tmp >> fonts.dir
+sed -e '/^-sazanami-/d' fonts.alias > fonts.alias.tmp
+mv -f fonts.alias.tmp fonts.alias
+rm -f fonts.dir.tmp