IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 4, 2010, 1:10:09 PM (16 years ago)
Author:
heather
Message:

the final changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/minidvodb_merge.pl

    r28211 r28221  
    138138            if (scalar @$stdout_buf == 0 ) { #it lists nothing if it is the first
    139139                $this_is_the_first =1;
     140                print "listing nothing\n";
    140141            } else {
    141142                my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     
    150151                    &my_die("Unable to parse minidvodb_name", $minidvodb_id, $PS_EXIT_PROG_ERROR);
    151152                } #but just to make sure, have it grab a minidvodb_name, to make sure it's not junk.
     153                print "found at least 1 minidvodbrun in merged state\n";
    152154                $this_is_the_first = 0;
    153155            }
    154156        }
    155         {
    156             if (!-e "$mergedvodb/Image.dat") {
    157                 $this_is_the_first = 1; #the first time it copied maybe it failed? we want it to copy this time
     157        print "$this_is_the_first $mergedvodb/Image.dat\n";
    158158       
     159         
     160        if (-e "$mergedvodb/Image.dat") {
     161            if ($this_is_the_first == 1) {
     162                &my_die("refusing to merge, this is the first, but files already exist in dir", $minidvodb_id, 4);
    159163            }
    160 
     164            $this_is_the_first =0;
    161165        }
    162 
     166       
     167        print "$this_is_the_first $mergedvodb/Image.dat\n";
    163168        {
    164169            my $merge_command;
    165170            my $mjd_merge_start = DateTime->now->mjd;   # MJD of starting script
    166171            if ($this_is_the_first) {
     172               
    167173                $merge_command = "cp -rp $minidvodb/* $mergedvodb";
    168                 print "$merge_command\n";
    169174            } else {
    170175                $merge_command = "$dvomerge $minidvodb into $mergedvodb";
Note: See TracChangeset for help on using the changeset viewer.