Changeset 23894 for trunk/ippScripts/scripts/receive_file.pl
- Timestamp:
- Apr 16, 2009, 5:54:55 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/receive_file.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/receive_file.pl
r23890 r23894 65 65 my $filename = "$tempdir/$file"; # Target filename 66 66 { 67 my $uri = "$source/ product/$fileset/$file"; # URI for datastore file67 my $uri = "$source/$product/$fileset/$file"; # URI for datastore file 68 68 my $command = "dsget --uri $uri --filename $filename"; # Command to execute 69 69 … … 81 81 82 82 my $command = "$tool -importrun -infile $filename"; # Command to execute 83 $command .= " -dbname $dbname" if defined $dbname; 83 84 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 84 85 run(command => $command, verbose => $verbose); … … 88 89 my @files = (); 89 90 { 90 my $command = "tar -C $tempdir -t vzf $filename"; # Command to execute91 my $command = "tar -C $tempdir -tzf $filename"; # Command to execute 91 92 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 92 93 run(command => $command, verbose => $verbose); 93 94 die "Unable to get listing of tar file $filename\n" unless $success; 94 95 95 foreach my $line (@$stdout_buf) { 96 my @lines = split(/\n/, join "", @$stdout_buf); # Lines from output 97 foreach my $line ( @lines ) { 96 98 $line =~ s/\#.*$//; 97 99 next unless $line =~ /\S+/; … … 99 101 my $file = $fields[0]; # Name of file 100 102 $file =~ s|^./||; 101 push @files, $file if defined $file;103 push @files, $file if $file =~ /\S+/; 102 104 } 103 105 } … … 115 117 my $from = "$tempdir/$file"; # Source for file 116 118 my $target = "$workdir/$file"; # Target destination for file 117 my $to = $ipprc->file_ prepare( $target ); # Target for move119 my $to = $ipprc->file_create( $target ); # Target for move 118 120 system("mv $from $to") == 0 or die "Unable to move $file into workdir $workdir: $!\n"; 119 121 } … … 129 131 { 130 132 my $command = "$receivetool -addresult"; 131 $command .= " -file $file_id";133 $command .= " -file_id $file_id"; 132 134 $command .= (" -dtime_copy " . (($mjd_copy - $mjd_start) * 86400)); 133 $command .= (" -dtime_extract " . (($mjd_extract - $mjd_ start) * 86400));135 $command .= (" -dtime_extract " . (($mjd_extract - $mjd_copy) * 86400)); 134 136 $command .= " -dbname $dbname" if defined $dbname; 137 138 139 print "$command\n"; 135 140 136 141 unless (defined $no_update) {
Note:
See TracChangeset
for help on using the changeset viewer.
