From 2394fdf12cba7b2bd03e4d5810e627cfab5b7308 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 8 Oct 2008 23:54:53 +0200 Subject: bin/checklinks: Allow 'links' as well as '.links' --- bin/checklinks | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'bin/checklinks') 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() { chomp; ($type, $src, $dst) = split; -- cgit v1.2.3