source: ProjectBuilder/devel/pb-modules/bin/pbdistrocheck@ 423

Last change on this file since 423 was 423, checked in by Bruno Cornec, 16 years ago
  • Improved pbdistrocheck to support -v flags
  • Fix Ubuntu issue on distribution detection
  • some more pb_log added
File size: 730 bytes
Line 
1#!/usr/bin/perl -w
2#
3# Project Builder Distribution Checker
4#
5# $Id$
6#
7# Copyright B. Cornec 2007
8# Provided under the GPL v2
9
10use strict 'vars';
11use Getopt::Long qw(:config auto_abbrev no_ignore_case);
12use Data::Dumper;
13use lib qw (lib);
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);
29
30my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init();
31print "distro tuple: ".join(',',($ddir, $dver, $dfam, $dtype, $pbsuf))."\n";
Note: See TracBrowser for help on using the repository browser.