Changeset 28104
- Timestamp:
- May 25, 2010, 4:56:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/haf_branches/ipp.20100512/ippScripts/scripts/minidvodb_createdb.pl
r28034 r28104 36 36 } 37 37 38 my ( $outroot, $dbname, $dvodb, $minidvodb_group, $camera, $minidvodb_name,$verbose, $no_update,38 my ( $outroot, $dbname, $dvodb, $minidvodb_group, $camera, $verbose, $no_update, 39 39 $no_op, $redirect, $save_temps); 40 40 GetOptions( … … 42 42 'dbname|d=s' => \$dbname, # Database name 43 43 'minidvodb_group|w=s' => \$minidvodb_group, # minidvodb_group. 44 'minidvodb_name|w=s' => \$minidvodb_name ,45 44 'outroot|w=s' => \$outroot, # output file base name 46 45 'dvodb|w=s' => \$dvodb, # output DVO database … … 54 53 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 55 54 pod2usage( 56 -msg => "Required options: --camera --minidvodb_group --dvodb --minidvodb_group --minidvodb_name--outroot",55 -msg => "Required options: --camera --dvodb --minidvodb_group --outroot", 57 56 -exitval => 3, 58 57 ) unless 59 58 defined $minidvodb_group and 60 defined $minidvodb_name and 61 defined $camera and 62 defined $outroot and 59 #defined $camera and 60 #defined $outroot and 63 61 defined $dvodb; 64 62 65 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $minidvodb_ name, $PS_EXIT_CONFIG_ERROR ); # IPP configuration63 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $minidvodb_group , $PS_EXIT_CONFIG_ERROR ); # IPP configuration 66 64 67 my $logDest = $ipprc->filename("LOG.EXP", $outroot) or &my_die("Missing entry from camera config", $minidvodb_ name, $PS_EXIT_CONFIG_ERROR);65 my $logDest = $ipprc->filename("LOG.EXP", $outroot) or &my_die("Missing entry from camera config", $minidvodb_group, $PS_EXIT_CONFIG_ERROR); 68 66 69 67 if ($redirect) { 70 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $minidvodb_ name, $PS_EXIT_SYS_ERROR );68 $ipprc->redirect_output($logDest) or my_die( "Unable to redirect output", $minidvodb_group, $PS_EXIT_SYS_ERROR ); 71 69 print "\n\n"; 72 70 print "Starting script $0 on $host\n\n"; … … 99 97 100 98 unless ($no_op) { 101 my $minidvodb_path; 102 if (defined $dvodbReal) { 103 $minidvodb_path = $dvodbReal . '/' . $minidvodb_name; 104 } else { 105 warn("dvodbReal undefined:\n"); 106 exit(4); 107 } 99 100 108 101 109 102 #see if there is already a new_not_ready … … 134 127 #create the minidvodb entry (well, the command for it) 135 128 my $fpaCommand = "$addtool -addminidvodbrun"; 136 $fpaCommand .= " -set_minidvodb_name $minidvodb_name";137 $fpaCommand .= " -set_minidvodb_path $minidvodb_path";138 129 $fpaCommand .= " -set_minidvodb_group $minidvodb_group"; 139 130 $fpaCommand .= " -set_mergedvodb_path $dvodbReal"; 140 131 $fpaCommand .= " -dbname $dbname" if defined $dbname; 141 132 print $fpaCommand; 142 133 # complain if it doesn't work 143 134 unless ($no_update) { … … 157 148 {#complain if it doesn't work 158 149 my $msg = shift; # Warning message on die 159 my $minidvodb_ name= shift; # Camtool identifier150 my $minidvodb_group = shift; # Camtool identifier 160 151 my $exit_code = shift; # Exit code to add 161 152
Note:
See TracChangeset
for help on using the changeset viewer.
