X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=maemian;h=c622f4f856375c8dd078aa5092ef5662728e4ec7;hb=305789536aa8419643ba9d329db827dfc1c2626d;hp=376c8902ebe20337d4eb05319acc63865dcb7ede;hpb=f4d3b45f11d35187a0016ade98244898045a80c5;p=maemian diff --git a/maemian b/maemian index 376c890..c622f4f 100755 --- a/maemian +++ b/maemian @@ -44,11 +44,19 @@ use strict; use warnings; use Getopt::Long; use Carp; - -unshift @INC, "/home/jeremiah/maemian/lib"; -require Maemian::Output; -my $lintout = new Maemian::Output; - +use lib qw(lib/); +use Maemian::Output; + +# --- Output settings. +my $out = new Maemian::Output; +# --- If this is set to true, then you only get msgs +$out->quiet(0); +$out->msg("Notice on"); +# --- If this is set to true, then you will get verbose messages. +$out->verbose(1); +$out->v_msg("Verbose on"); + +$out->color("auto"); # --- Command line options my $inputfile; # --- A file passed to maemian GetOptions ("inputfile|i=s" => \$inputfile); @@ -73,12 +81,12 @@ sub file_tests { print "W: Maintainer email address ($maintainer) might be the same as upstream.\n"; } else { - print "N: $maintainer\n"; + $out->msg("$maintainer"); } if (grep /BEGIN PGP SIGNED MESSAGE/, @lines) { - print "N: $filename is signed\n"; + $out->v_msg("$filename is signed"); } - # print "\n$dirs\n$filename\n"; + $out->debug_msg(3, "\n$dirs\n$filename\n"); } else { croak "File not readable: $!\n";