Changeset 1898


Ignore:
Timestamp:
Sep 30, 2014, 10:08:00 AM (5 years ago)
Author:
bruno
Message:

pbdistrogetparam -> pbgetparam and fix printing of values now for both
project and distros

File:
1 moved

Legend:

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

    r1897 r1898  
    114114@tab = pb_conf_get_all() if (defined $opts{'a'});
    115115
     116my %rep;
    116117my $i = 0;
    117 my %rep;
     118# Index on prj
    118119foreach my $r (pb_conf_get(@tab)) {
    119     $rep{$tab[$i]} = $r->{$ENV{'PBPROJ'}} if (((defined $opts{'v'}) || (defined $opts{'a'})) && (defined  $r->{$ENV{'PBPROJ'}}));
     120    $rep{$tab[$i]} = $r->{'default'} if (defined  $r->{'default'});
     121    $rep{$tab[$i]} = $r->{$ENV{'PBPROJ'}} if (defined  $r->{$ENV{'PBPROJ'}});
    120122    $i++;
    121123}
     124# Index on distro
     125$i = 0;
    122126foreach my $r (pb_distro_get_param($pbos,pb_conf_get(@tab))) {
    123     $rep{$tab[$i]} = $r if (((defined $opts{'v'}) || (defined $opts{'a'})) && (defined $tab[$i]));
     127    $rep{$tab[$i]} = $r if (defined $tab[$i]);
    124128    $i++;
    125129}
    126130foreach my $r (keys %rep) {
    127131    print "$r => " if ((defined $opts{'v'}) || (defined $opts{'a'}));
    128     $i++;
    129132    print "$rep{$r}\n";
    130133}
Note: See TracChangeset for help on using the changeset viewer.