Changeset 20811 for trunk/tools/diff_outputs.pl
- Timestamp:
- Nov 20, 2008, 5:37:35 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/tools/diff_outputs.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/diff_outputs.pl
r20616 r20811 23 23 my ($diff_id); # Diff of interest 24 24 my ($input); # Input list 25 my ($products); # Products of interest 25 26 26 27 GetOptions( … … 30 31 'dbpass=s' => \$db_pw, # Database p/w 31 32 'diff_id=s' => \$diff_id, # Diff identifier 33 'products=s' => \$products, # Products of interest 32 34 ) or die "Unable to parse arguments.\n"; 33 35 die "Unknown option: @ARGV\n" if @ARGV; … … 54 56 ) or die "Unable to execute SQL: $DBI::errstr"; 55 57 58 my @products; # Array of products 59 if (defined $products) { 60 @products = split /,/, $products; 61 } else { 62 @products = keys %{EXTENSIONS()}; 63 } 64 56 65 foreach my $diff ( @$diffs ) { 57 copy_extensions( $diff, EXTENSIONS() ); 66 foreach my $product ( @products ) { 67 copy_extension( $diff, ${EXTENSIONS()}{$product} ); 68 } 58 69 } 70 59 71 60 72 # Pau. 61 73 62 74 63 sub copy_extension s75 sub copy_extension 64 76 { 65 77 my $path = shift; # Path to copy 66 my $ext ensions = shift; # Extensions structure78 my $ext = shift; # Extension to copy 67 79 68 foreach my $type ( keys %$extensions ) { 69 my $ext = $$extensions{$type}; # Extension 70 my $file = "$path$ext"; # File 71 my $source = `ipp_datapath.pl $file` or die "Unable to locate $file\n"; # Actual file 72 chomp $source; 73 my ($target) = $source =~ m|^.*[:/](.*)|; # Target name 74 !system "cp $source $target" or die "Unable to copy $source\n"; 75 } 80 my $file = "$path$ext"; # File 81 my $source = `ipp_datapath.pl $file` or die "Unable to locate $file\n"; # Actual file 82 chomp $source; 83 my ($target) = $source =~ m|^.*[:/](.*)|; # Target name 84 !system "cp $source $target" or die "Unable to copy $source\n"; 76 85 }
Note:
See TracChangeset
for help on using the changeset viewer.
