Last change
on this file since 897 was 839, checked in by Bruno Cornec, 15 years ago |
- Adds option support for pbdistrocheck (-v and -d)
- Fix a bug on pbvi/pbg for function having binary in their name
|
File size:
878 bytes
|
Rev | Line | |
---|
[176] | 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 |
|
---|
| 10 | use strict 'vars';
|
---|
[423] | 11 | use Getopt::Long qw(:config auto_abbrev no_ignore_case);
|
---|
[176] | 12 | use Data::Dumper;
|
---|
| 13 | use lib qw (lib);
|
---|
[423] | 14 | use ProjectBuilder::Distribution;
|
---|
| 15 | use ProjectBuilder::Base;
|
---|
[176] | 16 |
|
---|
[423] | 17 | my %opts; # CLI Options
|
---|
| 18 |
|
---|
[839] | 19 | GetOptions(
|
---|
| 20 | "verbose|v+" => \$opts{'v'},
|
---|
| 21 | "description|d" => \$opts{'d'}
|
---|
| 22 | );
|
---|
[423] | 23 | if (defined $opts{'v'}) {
|
---|
[495] | 24 | $pbdebug = $opts{'v'};
|
---|
[423] | 25 | }
|
---|
| 26 | if (defined $opts{'l'}) {
|
---|
[495] | 27 | open(pbLOG,"> $opts{'l'}") || die "Unable to log to $opts{'l'}: $!";
|
---|
| 28 | $pbLOG = \*pbLOG;
|
---|
| 29 | $pbdebug = 0 if ($pbdebug == -1);
|
---|
[423] | 30 | }
|
---|
[495] | 31 | pb_log_init($pbdebug, $pbLOG);
|
---|
[423] | 32 |
|
---|
[756] | 33 | my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch) = pb_distro_init();
|
---|
[839] | 34 | if (defined $opts{'d'}) {
|
---|
| 35 | print "\u$ddir $dver\n";
|
---|
| 36 | } else {
|
---|
| 37 | print "distro tuple: ".join(',',($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch))."\n";
|
---|
| 38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.