- Timestamp:
- May 12, 2023, 9:21:20 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl
r42451 r42462 14 14 15 15 my $input; 16 my ($myhost, $dateword, $topdir, $ stage) = &parse_cmdopts;16 my ($myhost, $dateword, $topdir, $basedir, $stage) = &parse_cmdopts; 17 17 18 18 # check that we are running this script on 'myhost' … … 23 23 my ($ins_list_r, $dst_list_r, $md5_list_r) = &load_instance_list (); 24 24 25 my $output = "$ topdir/$dateword/$myhost.md5s.txt";25 my $output = "$basedir/$dateword/$myhost.md5s.txt"; 26 26 27 27 # read in existing md5s … … 66 66 exit 0; 67 67 68 # use global $ topdir, $dateword, $myhost, $stage68 # use global $basedir, $dateword, $myhost, $stage 69 69 sub load_instance_list { 70 70 my (@ins_list, @dst_list, @md5_list); 71 71 72 72 # load the master list 73 my $input = "$ topdir/$dateword/$myhost.inst.$stage.txt";73 my $input = "$basedir/$dateword/$myhost.inst.$stage.txt"; 74 74 &load_instance_list_onefile ($input, \@ins_list, \@dst_list, \@md5_list); 75 75 76 76 # 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"); 78 78 foreach my $infile (@instlist) { 79 79 &load_instance_list_onefile ($infile, \@ins_list, \@dst_list, \@md5_list); … … 144 144 unless ($stage >= 0) { die "stage must be a non-negative integer\n"; } 145 145 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); 147 150 } 148 151
Note:
See TracChangeset
for help on using the changeset viewer.
