diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-06-22 07:52:21 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-06-22 07:52:21 +0200 |
commit | 828033a186b47a5139f2d71d7ecd2d5e014714ff (patch) | |
tree | 9e8e6dedeafc2aa97354fce3dfb39aa2e2fd51c7 | |
parent | 2d7641cd40320cc86291ce1468148e46bc0635ca (diff) |
checklinks: Use exit code to indicate grave errors
-rwxr-xr-x | bin/checklinks | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/checklinks b/bin/checklinks index ed6165b..3798a23 100755 --- a/bin/checklinks +++ b/bin/checklinks @@ -12,6 +12,7 @@ my $msglevel = 0; my $remove = 0; my %substitute; my $linkfile; +my $exit = 0; if (-f '.links') { $linkfile = '.links'; @@ -119,6 +120,10 @@ sub mkdirs { sub print_format { my ($message, $src, $dst, $color, $level) = @_; + if ($msglevel > 1) { + $exit++; + } + return if ($level < $msglevel); if (defined($color)) { printf(colored('%-9s', $color), $message); @@ -128,6 +133,8 @@ sub print_format { printf(" %-15s -> %-15s\n", $src, $dst); } +exit($exit); + __END__ =head1 NAME |