summaryrefslogtreecommitdiff
path: root/japanese/alias-fonts/pkg-deinstall
blob: c1f89ca64df8fc8a84650c143a9bf23d2499ea1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
$prefix = $ENV{'PKG_PREFIX'};
$dir = "$prefix/lib/X11/fonts/misc";
$to =  "$dir/fonts.alias";
$from = "$to.orig";
rename($to, $from) || die("Can't rename: $!");
open(IN, $from) || die("Can't open $from: $!");
open(OUT, ">$to") || die("Can't open $to: $!");
while (<IN>) {
	chop;
	if (/^\s*!/ || /^\s*$/) {
		print OUT "$_\n";
	}
	else {
		@line = split(/\s+/, $_);
		@elm = split(/-+/, $line[0]);
		if ($elm[1] ne 'netscape' && $elm[1] ne 'netscape.k10') {
			print OUT "$_\n";
		}
	}
}
#system("$prefix/bin/xset fp rehash");