Changeset 26271 for trunk/psconfig/pschecklibs
- Timestamp:
- Nov 23, 2009, 8:13:45 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/psconfig/pschecklibs (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psconfig/pschecklibs
r25008 r26271 11 11 $version = ""; 12 12 $build = 0; 13 $list_modules = 0; 14 my $only = ""; 13 15 my %force; 14 16 my %done; # Tarballs that have been processed … … 35 37 shift; shift; next; 36 38 } 39 if ($ARGV[0] eq "-only") { 40 if (@ARGV < 2) { die "-only must be coupled to a library name\n"; } 41 $only = lc($ARGV[1]); 42 shift; shift; next; 43 } 37 44 if ($ARGV[0] eq "-h") { &usage (); } 38 45 if ($ARGV[0] eq "help") { &usage (); } … … 40 47 if ($ARGV[0] eq "--help") { &usage (); } 41 48 if ($ARGV[0] eq "-list") { &list_distributions(); } 49 if ($ARGV[0] eq "-modules") { $list_modules = 1; shift; next; } 42 50 @tARGV = (@tARGV, $ARGV[0]); 43 51 shift; … … 58 66 @list = <FILE>; 59 67 close (FILE); 68 69 if ($list_modules) { &list_modules(); } 60 70 61 71 # set the psconfig version: … … 146 156 if (($auto_force ne "Y") && ($auto_force ne "N")) { die "invalid value for auto_force field\n"; } 147 157 158 if ($only && ($only ne lc($name))) { next; } 148 159 149 160 if ((defined $force{lc($name)} or defined $force{'all'}) and … … 501 512 502 513 sub usage { 503 print STDERR "USAGE: pschecklibs [-version] [-build]\n"; 514 print STDERR "USAGE: pschecklibs [-version] [-build] [-only module] [-force module] [-force all]\n"; 515 print STDERR " multiple [-force (module)] options may be specified\n"; 516 print STDERR "USAGE: pschecklibs [-list] : show C libraries file\n"; 517 print STDERR "USAGE: pschecklibs [-modules] : list available C modules\n"; 504 518 exit 2; 505 519 } … … 521 535 } 522 536 537 sub list_modules { 538 539 foreach $line (@list) { 540 chop $line; 541 if ($line =~ m|^\s*$|) { next; } 542 if ($line =~ m|^\s*\#|) { next; } 543 544 ($type, $name, $altnames, $altpaths, $tarball, $tardir, $auto_force, $configure_opts, $make_opts, $install_opts) = split (" ", $line); 545 if ($type eq "bin") { 546 print STDERR "bin: $name\n"; 547 } 548 if ($type eq "lib") { 549 print STDERR "lib: $name\n"; 550 } 551 } 552 exit 0; 553 } 554 523 555 sub failure { 524 556 system ("ls");
Note:
See TracChangeset
for help on using the changeset viewer.
