Changeset 27905 for trunk/DataStore/scripts/dsgetfileset
- Timestamp:
- May 10, 2010, 1:36:36 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/DataStore/scripts/dsgetfileset (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataStore/scripts/dsgetfileset
r27229 r27905 17 17 use File::Basename qw( basename ); 18 18 19 my ($uri, $outdir, $timeout, $skip_checks, $ no_proxy, $verbose);19 my ($uri, $outdir, $timeout, $skip_checks, $unpack, $no_proxy, $verbose); 20 20 21 21 GetOptions( … … 24 24 'timeout|t=s' => \$timeout, 25 25 'skip-checks' => \$skip_checks, 26 'unpack' => \$unpack, 26 27 'no-proxy' => \$no_proxy, 27 28 'verbose|v' => \$verbose, … … 89 90 exit $status; 90 91 } 92 93 if ($unpack) { 94 my $file_type = `file $outfile`; 95 if ($file_type =~ /FITS/) { 96 my $packed_file = "${outfile}.fz"; 97 rename $outfile, $packed_file 98 or die "failed to rename $outfile $packed_file"; 99 100 # unpack the fits file and delete the input 101 # This works whether or not the file is compressed 102 $command = "funpack -D $packed_file"; 103 print "$command\n" if $verbose; 104 $rc = system $command; 105 if ($rc) { 106 my $status = $rc >> 8; 107 print STDERR "failed to funpack $outfile: rc: $rc status: $status\n"; 108 exit $status; 109 } 110 } 111 } 91 112 } 92 113 … … 129 150 130 151 Do not load proxy environment variables. 152 153 =item * --unpack 154 155 Uncompress fits files if compressed 131 156 132 157 Optional.
Note:
See TracChangeset
for help on using the changeset viewer.
