Changeset 423 in ProjectBuilder for devel/pb-modules/bin/pbdistrocheck


Ignore:
Timestamp:
May 3, 2008, 1:03:24 AM (16 years ago)
Author:
Bruno Cornec
Message:
  • Improved pbdistrocheck to support -v flags
  • Fix Ubuntu issue on distribution detection
  • some more pb_log added
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/bin/pbdistrocheck

    r402 r423  
    99
    1010use strict 'vars';
     11use Getopt::Long qw(:config auto_abbrev no_ignore_case);
    1112use Data::Dumper;
    1213use lib qw (lib);
    13 use ProjectBuilder::Distribution qw (pb_distro_init);
     14use ProjectBuilder::Distribution;
     15use ProjectBuilder::Base;
     16
     17my %opts;                   # CLI Options
     18
     19GetOptions("verbose|v+" => \$opts{'v'});
     20if (defined $opts{'v'}) {
     21    $debug = $opts{'v'};
     22}
     23if (defined $opts{'l'}) {
     24    open(LOG,"> $opts{'l'}") || die "Unable to log to $opts{'l'}: $!";
     25    $LOG = \*LOG;
     26    $debug = 0  if ($debug == -1);
     27    }
     28pb_log_init($debug, $LOG);
    1429
    1530my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init();
Note: See TracChangeset for help on using the changeset viewer.