Changeset 21091
- Timestamp:
- Jan 8, 2009, 10:57:15 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/tools/stack_outputs.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/stack_outputs.pl
r20885 r21091 25 25 my ($stack_id); # Stack of interest 26 26 my ($input); # Input list 27 my ($products); # Products of interest 27 28 28 29 GetOptions( … … 32 33 'dbpass=s' => \$db_pw, # Database p/w 33 34 'stack_id=s' => \$stack_id, # Stack identifier 35 'products=s' => \$products, # Products of interest 34 36 ) or die "Unable to parse arguments.\n"; 35 37 die "Unknown option: @ARGV\n" if @ARGV; … … 56 58 ) or die "Unable to execute SQL: $DBI::errstr"; 57 59 60 my @products; # Array of products 61 if (defined $products) { 62 @products = split /,/, $products; 63 } else { 64 @products = keys %{EXTENSIONS()}; 65 } 66 58 67 foreach my $stack ( @$stacks ) { 59 copy_extensions( $stack, EXTENSIONS() ); 68 foreach my $product ( @products ) { 69 copy_extension( $stack, ${EXTENSIONS()}{$product} ); 70 } 60 71 } 61 72 … … 63 74 64 75 65 sub copy_extension s76 sub copy_extension 66 77 { 67 78 my $path = shift; # Path to copy 68 my $ext ensions = shift; # Extensions structure79 my $ext = shift; # Extension to copy 69 80 70 foreach my $type ( keys %$extensions ) { 71 my $ext = $$extensions{$type}; # Extension 72 my $neb = "$path$ext"; # Nebulous file 73 my $source = `neb-locate --path $neb` or die "Unable to locate $neb\n"; # Actual file 74 chomp $source; 75 my ($target) = $source =~ m|^.*:(.*)|; # Target name 76 !system "cp $source $target" or die "Unable to copy $source\n"; 77 } 81 my $file = "$path$ext"; # File 82 my $source = `ipp_datapath.pl $file` or die "Unable to locate $file\n"; # Actual file 83 chomp $source; 84 my ($target) = $source =~ m|^.*[:/](.*)|; # Target name 85 !system "cp $source $target" or die "Unable to copy $source\n"; 78 86 }
Note:
See TracChangeset
for help on using the changeset viewer.
