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

Last change on this file since 620 was 620, checked in by Bruno Cornec, 15 years ago
  • change pb_distro_init interface and add a 6th parameter which is the update CLI to use for that distro.
File size: 762 bytes
RevLine 
[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
10use strict 'vars';
[423]11use Getopt::Long qw(:config auto_abbrev no_ignore_case);
[176]12use Data::Dumper;
13use lib qw (lib);
[423]14use ProjectBuilder::Distribution;
15use ProjectBuilder::Base;
[176]16
[423]17my %opts; # CLI Options
18
19GetOptions("verbose|v+" => \$opts{'v'});
20if (defined $opts{'v'}) {
[495]21 $pbdebug = $opts{'v'};
[423]22}
23if (defined $opts{'l'}) {
[495]24 open(pbLOG,"> $opts{'l'}") || die "Unable to log to $opts{'l'}: $!";
25 $pbLOG = \*pbLOG;
26 $pbdebug = 0 if ($pbdebug == -1);
[423]27 }
[495]28pb_log_init($pbdebug, $pbLOG);
[423]29
[620]30my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd) = pb_distro_init();
31print "distro tuple: ".join(',',($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd))."\n";
Note: See TracBrowser for help on using the repository browser.