X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fblhc;h=10b39f388c9b1769d3e308b2903a01524b2e6ddf;hb=8ee5374c67a1ed7f48a40567e764865ad26a064e;hp=1a3d55c55f7ef70ee7d929a170e27428f1a602a4;hpb=a478f5c6485df6520be9e08832fbf8f1e0a39d15;p=blhc%2Fblhc.git diff --git a/bin/blhc b/bin/blhc index 1a3d55c..10b39f3 100755 --- a/bin/blhc +++ b/bin/blhc @@ -22,7 +22,6 @@ use strict; use warnings; use Getopt::Long (); -use Term::ANSIColor (); use Text::ParseWords (); our $VERSION = '0.01'; @@ -138,7 +137,7 @@ my $file_extension_regex = qr/ \s \S+ # Filename without extension. \. - ([^\\.,;:\s]+) # File extension. + ([^\/\\.,;:\s]+)# File extension. (?=\s|\\) # At end of word. Can't use \b because some files have non # word characters at the end and because \b matches double # extensions (like .cpp.o). Works always as all lines are @@ -449,6 +448,12 @@ along with this program. If not, see . exit 0; } +# Don't load Term::ANSIColor in buildd mode because Term::ANSIColor is not +# installed on Debian's buildds. +if (not $option_buildd) { + require Term::ANSIColor; +} + if ($option_all) { $option_pie = 1; $option_bindnow = 1; @@ -563,7 +568,7 @@ FILE: foreach my $file (@ARGV) { # Ignore compiler warnings for now. next if $line =~ /$warning_regex/o; - if ($line =~ /\033/) { # esc + if (not $option_buildd and $line =~ /\033/) { # esc # Remove all ANSI color sequences which are sometimes used in # non-verbose builds. $line = Term::ANSIColor::colorstrip($line);