#!/bin/sh if [ "$2" != "DEINSTALL" ]; then exit 0 fi FONTDIR=${PKG_PREFIX}/lib/X11/fonts/local FAFILE=${PKG_PREFIX}/share/doc/ja/k20fonts/fonts.alias grepv() { awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2 } echo "Updating ${FONTDIR}/fonts.alias" cd ${FONTDIR} touch fonts.alias cp fonts.alias fonts.alias.orig grepv ${FAFILE} fonts.alias.orig > fonts.alias if [ ! -s fonts.alias ]; then rm -f fonts.alias; fi rm -f fonts.alias.orig echo "**********************************************************" echo "You should restart X server or do 'xset fp rehash' command" echo "to enable this update." echo "**********************************************************" exit 0