Changeset 20689
- Timestamp:
- Nov 11, 2008, 1:29:12 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_definerun.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_definerun.pl
r20677 r20689 43 43 44 44 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 45 pod2usage( -msg => "Required options: -- exp_id --workdir",45 pod2usage( -msg => "Required options: --warp_id --workdir", 46 46 -exitval => 3) unless 47 defined $ exp_idand48 defined $w orkdir;47 defined $workdir and 48 defined $warp_id; 49 49 50 50 # $ipprc->define_camera($camera); … … 54 54 my $magictool = can_run('magictool') or (warn "Can't find magictool" and $missing_tools = 1); 55 55 my $difftool = can_run('difftool') or (warn "Can't find difftool" and $missing_tools = 1); 56 my $warptool = can_run('warptool') or (warn "Can't find warptool" and $missing_tools = 1); 56 57 if ($missing_tools) { 57 58 warn("Can't find required tools."); … … 60 61 61 62 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files 63 64 if (!$exp_id) { 65 my $command = "$warptool -warped -warp_id $warp_id -limit 1"; 66 $command .= " -dbname $dbname" if defined $dbname; 67 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 68 run(command => $command, verbose => $verbose); 69 unless ($success) { 70 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 71 &my_die("Unable to perform warptool -warped error_code: $error_code", $error_code); 72 } 73 74 my $warptool_output = join "", @$stdout_buf; 75 76 my $warpskyfiles = parse_md_fast($mdcParser, $warptool_output); 77 &my_die("Unable to parse metadata list", $PS_EXIT_UNKNOWN_ERROR) unless $warpskyfiles; 78 79 my $warped = $warpskyfiles->[0]; 80 $exp_id = $warped->{exp_id}; 81 &my_die("failed to get exp_id for warp: $warp_id", $PS_EXIT_UNKNOWN_ERROR) unless $exp_id; 82 } 62 83 63 84 ### Get a list of inputs
Note:
See TracChangeset
for help on using the changeset viewer.
