- Timestamp:
- Feb 26, 2013, 6:37:21 AM (12 years ago)
- Location:
- devel/pb-modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/Makefile.PL
r1528 r1694 20 20 #ABSTRACT_FROM => 'bin/pb', # retrieve abstract from module 21 21 AUTHOR => 'Bruno Cornec <bruno#project-builder.org>', 22 EXE_FILES => [ qw( bin/pbdistrocheck ) ], 23 MAN1PODS => { 'bin/pbdistrocheck' => '$(INST_MAN1DIR)/pbdistrocheck.$(MAN1EXT)', }, 22 EXE_FILES => [ qw(bin/pbdistrocheck bin/pbdistrogetparam) ], 23 MAN1PODS => { 24 'bin/pbdistrocheck' => '$(INST_MAN1DIR)/pbdistrocheck.$(MAN1EXT)', 25 'bin/pbdistrogetparam' => '$(INST_MAN1DIR)/pbdistrogetparam.$(MAN1EXT)', 26 }, 24 27 # MAN3PODS => { 'lib/ProjectBuilder/Distribution.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Distribution.$(MAN3EXT)', 25 28 #'lib/ProjectBuilder/Conf.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Conf.$(MAN3EXT)', -
devel/pb-modules/bin/pbdistrogetparam
r1690 r1694 32 32 =head1 SYNOPSIS 33 33 34 pbdistrogetparam [-h][-v][-p project][-d distro-ver-arch] param34 pbdistrogetparam [-h][-v][-p project][-d distro-ver-arch] [param|-a] 35 35 36 36 =head1 OPTIONS … … 53 53 54 54 Name of the project you're working on (or use the env variable PBPROJ) 55 56 =item B<-a|--all> 57 58 Process all configuration parameters 55 59 56 60 =back … … 88 92 "verbose|v+" => \$opts{'v'}, 89 93 "help|h" => \$opts{'h'}, 94 "all|a" => \$opts{'a'}, 90 95 "project|p=s" => \$opts{'p'}, 91 "distribution|d " => \$opts{'d'},96 "distribution|d=s" => \$opts{'d'}, 92 97 ); 98 if (defined $opts{'h'}) { 99 pb_syntax(0,$opts{'h'}-1); 100 } 101 if (defined $opts{'man'}) { 102 pb_syntax(0,2); 103 } 93 104 if (defined $opts{'v'}) { 94 105 $pbdebug = $opts{'v'}; … … 99 110 pb_env_init($opts{'p'},0,"none",0); 100 111 my $pbos = pb_distro_get_context($dist); 101 foreach my $r (pb_distro_get_param($pbos,pb_conf_get(@ARGV))) { 112 113 my @tab = @ARGV; 114 @tab = pb_conf_get_all() if (defined $opts{'a'}); 115 116 my $i = 0; 117 foreach my $r (pb_distro_get_param($pbos,pb_conf_get(@tab))) { 118 print "$tab[$i] => " if ((defined $opts{'v'}) || (defined $opts{'a'})); 119 $i++; 102 120 print "$r\n"; 103 121 } -
devel/pb-modules/lib/ProjectBuilder/Conf.pm
r1644 r1694 29 29 30 30 our @ISA = qw(Exporter); 31 our @EXPORT = qw(pb_conf_init pb_conf_add pb_conf_read pb_conf_read_if pb_conf_get pb_conf_get_if pb_conf_print );31 our @EXPORT = qw(pb_conf_init pb_conf_add pb_conf_read pb_conf_read_if pb_conf_get pb_conf_get_if pb_conf_print pb_conf_get_all); 32 32 ($VERSION,$REVISION) = pb_version_init(); 33 33 … … 388 388 389 389 390 =item B<pb_conf_get_all> 391 392 This function returns an array wirh all configuration parameters 393 394 =cut 395 396 sub pb_conf_get_all { 397 398 return(sort keys %$h); 399 } 400 401 390 402 =item B<pb_conf_print> 391 403 … … 398 410 pb_log(0,"Full pb configuration for project $ENV{'PBPROJ'}\n"); 399 411 pb_log(0,"====================================\n"); 400 foreach my $k ( sort keys %$h) {412 foreach my $k (pb_conf_get_all()) { 401 413 pb_log(0,"$k => ".Dumper($h->{$k})."\n"); 402 414 } 403 415 } 404 405 416 =back 406 417
Note:
See TracChangeset
for help on using the changeset viewer.