summaryrefslogtreecommitdiffstats
path: root/bin/checkdistrib
blob: 2da8cce6292ab33e0b87360d397cdb5acf508843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/perl

# $Id: checkdistrib 56937 2006-08-21 10:19:01Z nanardon $

use strict;
use warnings;
use MDV::Distribconf::Build;
use Getopt::Long;

GetOptions(
) or die "Error parsing command line argument\n";

my @distribs = @ARGV;

my $error = 0;

foreach my $tree (@distribs) {
    my $mdc = MDV::Distribconf::Build->new($tree);
    if(!$mdc->load) {
        print "\nCannot locate a distrib in $tree\n";
        next;
    } else {
        printf(
            "\nChecking distrib in %s (%s for %s)\n",
            $tree,
            $mdc->getvalue(undef, 'version') || 'unknown',
            $mdc->getvalue(undef, 'arch') || 'unknown',
        );
    }
    
    $error += $mdc->checkdistrib(\*STDOUT);
}

exit($error);