From 828033a186b47a5139f2d71d7ecd2d5e014714ff Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 22 Jun 2009 07:52:21 +0200 Subject: checklinks: Use exit code to indicate grave errors --- bin/checklinks | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3