IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 12, 2023, 9:21:20 AM (3 years ago)
Author:
eugene
Message:

changing directory structure to place nights in years

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl

    r42451 r42462  
    1414
    1515my $input;
    16 my ($myhost, $dateword, $topdir, $stage) = &parse_cmdopts;
     16my ($myhost, $dateword, $topdir, $basedir, $stage) = &parse_cmdopts;
    1717
    1818# check that we are running this script on 'myhost'
     
    2323my ($ins_list_r, $dst_list_r, $md5_list_r) = &load_instance_list ();
    2424
    25 my $output = "$topdir/$dateword/$myhost.md5s.txt";
     25my $output = "$basedir/$dateword/$myhost.md5s.txt";
    2626
    2727# read in existing md5s
     
    6666exit 0;
    6767
    68 # use global $topdir, $dateword, $myhost, $stage
     68# use global $basedir, $dateword, $myhost, $stage
    6969sub load_instance_list {
    7070    my (@ins_list, @dst_list, @md5_list);
    7171
    7272    # load the master list
    73     my $input = "$topdir/$dateword/$myhost.inst.$stage.txt";
     73    my $input = "$basedir/$dateword/$myhost.inst.$stage.txt";
    7474    &load_instance_list_onefile ($input, \@ins_list, \@dst_list, \@md5_list);
    7575
    7676    # there may be additional instances in files with names like HOSTNAME.XYnn.inst.STAGE
    77     my @instlist = glob ("$topdir/$dateword/$myhost.XY??.inst.$stage.txt");
     77    my @instlist = glob ("$basedir/$dateword/$myhost.XY??.inst.$stage.txt");
    7878    foreach my $infile  (@instlist) {
    7979        &load_instance_list_onefile ($infile, \@ins_list, \@dst_list, \@md5_list);
     
    144144    unless ($stage >= 0) { die "stage must be a non-negative integer\n"; }
    145145   
    146     return ($myhost, $dateobs, $topdir, $stage);
     146    my $yearobs = substr ($dateobs, 0, 4);
     147    my $basedir = "$topdir/$yearobs";
     148
     149    return ($myhost, $dateobs, $topdir, $basedir, $stage);
    147150}
    148151
Note: See TracChangeset for help on using the changeset viewer.