File: prerm

package info (click to toggle)
wfrench 1.0-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 524 kB
  • ctags: 131
  • sloc: perl: 83; makefile: 69
file content (18 lines) | stat: -rw-r--r-- 644 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl
# wfrench.prerm
# Written by Charles Briscoe-Smith <cpbs@debian.org> based loosely on
# an older, unattributed, script.  I release this to the Public Domain.
# Ask <cpbs@debian.org> if you have problems with this script.

$words          = "/usr/dict/words";
$dict           = "/etc/dictionary";
$dict_rel_words = "../../etc/dictionary";

# $words should disappear when we become unconfigured, including during
# an upgrade.

# Remove $words if it points to $dict.
if ( -l $words and ( readlink $words eq $dict
                     or readlink $words eq $dict_rel_words )) {
  unlink $words or die "Can't remove `$words'.\n";
}