diff options
Diffstat (limited to 'bin/checklinks')
-rwxr-xr-x | bin/checklinks | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/checklinks b/bin/checklinks index fc67f3b..79ab334 100755 --- a/bin/checklinks +++ b/bin/checklinks @@ -7,9 +7,14 @@ my $base = $ENV{HOME}; my ($type, $src, $dst); my $quiet = 0; my $remove = 0; - -unless (-f ".links") { - exit 0; +my $linkfile; + +if (-f '.links') { + $linkfile = '.links'; +} elsif (-f 'links') { + $linkfile = 'links'; +} else { + exit(0); } if (defined($ARGV[0])) { @@ -21,7 +26,7 @@ if (defined($ARGV[0])) { } } -open(LINKS, '<.links') or die($!); +open(LINKS, '<', $linkfile) or die($!); while(<LINKS>) { chomp; ($type, $src, $dst) = split; |