- Timestamp:
- Apr 4, 2023, 8:18:25 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/check_md5s_dateobs.pl
r42415 r42441 12 12 use Getopt::Long qw( GetOptions :config auto_help auto_version ); 13 13 14 # USAGE: check_md5s_dateobs.pl --dateobs (night) 14 # USAGE: check_md5s_dateobs.pl --dateobs (night) --topdir (topdir) 15 15 16 my ($dateword ) = &parse_cmdopts;16 my ($dateword, $stage, $topdir) = &parse_cmdopts; 17 17 18 my @instlist = glob ("$ dateword/*.inst.txt");19 my @md5slist = glob ("$ dateword/*.md5s.txt");18 my @instlist = glob ("$topdir/$dateword/*.inst.$stage.txt"); 19 my @md5slist = glob ("$topdir/$dateword/*.md5s.txt"); 20 20 21 21 my $Nfail = 0; … … 25 25 # find the matching md5sum file for this host 26 26 27 my ($host) = $instfile =~ m|$dateword/([0-9a-zA-Z]*).inst. txt|;27 my ($host) = $instfile =~ m|$dateword/([0-9a-zA-Z]*).inst.$stage.txt|; 28 28 # print STDERR "host: $host\n"; 29 29 … … 100 100 sub parse_cmdopts { 101 101 102 my ($dateobs );103 GetOptions( 'dateobs=s' => \$dateobs ) || pod2usage(2);102 my ($dateobs, $stage, $topdir); 103 GetOptions( 'dateobs=s' => \$dateobs, 'topdir=s' => \$topdir, 'stage=s' => \$stage) || pod2usage(2); 104 104 105 105 pod2usage( -msg => "Cannot determine target date, use --dateobs YYYY/MM/DD", -exitval => 2) unless defined $dateobs; 106 pod2usage( -msg => "Specify the top-level output directory with --topdir", -exitval => 2) unless defined $topdir; 107 pod2usage( -msg => "Define the stage (v0, v1, etc) with --stage", -exitval => 2) unless defined $stage; 106 108 107 109 # check the date format (require YYYY/MM/DD and use that from 00:00:00 to 23:59:59 or take start and end?) … … 115 117 my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day); 116 118 117 return ($dateword );119 return ($dateword, $stage, $topdir); 118 120 } 119 121
Note:
See TracChangeset
for help on using the changeset viewer.
