aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/alias-fonts/pkg-deinstall
blob: a22d2653fb259c5f33c5f21a1441099d30e22486 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# $FreeBSD$

if [ $2 != "DEINSTALL" ]; then
  exit 0
fi

dir="${PKG_PREFIX}/lib/X11/fonts/local";
to="$dir/fonts.alias";
from="$to.orig";

if ! mv $to $from; then
  echo "Couldn't rename $to."
  exit 1
fi

IFS="
"

while read line; do
  trimmed=${line# *}
  case $trimmed in
    -alias-*) ;;
    *) echo $line;;
  esac
done < $from > $to