IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 23, 2023, 2:05:41 PM (3 years ago)
Author:
eugene
Message:

adding advance task, fix the logs

File:
1 edited

Legend:

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

    r42411 r42430  
    1111use Getopt::Long qw( GetOptions :config auto_help auto_version );
    1212
    13 # USAGE: get_md5s_instances.pl --hostname (hostname) --input (file)
     13# USAGE: get_md5s_instances.pl --hostname (hostname) --input (file) --stage (v0,v1,etc)
    1414
    15 my ($myhost, $input) = &parse_cmdopts;
     15my ($myhost, $input, $stage) = &parse_cmdopts;
    1616
    1717# check that we are running this script on 'myhost'
     
    2323
    2424my $output = $input;
    25 $output =~ s/inst/md5s/;
     25$output =~ s/inst.$stage/md5s/;
    2626
    2727if ($output eq $input) { die "output file ($output) matches input file ($input)\n"; }
     
    8484sub parse_cmdopts {
    8585
    86     my ($myhost, $input);
    87     GetOptions( 'hostname=s' => \$myhost, 'input=s' => \$input) || pod2usage(2);
     86    my ($myhost, $input, $stage);
     87    GetOptions( 'hostname=s' => \$myhost, 'input=s' => \$input, 'stage=s' => \$stage) || pod2usage(2);
    8888   
    8989    pod2usage( -msg => "Provide the input list with --input", -exitval => 2) unless defined $input;
    9090    pod2usage( -msg => "Define the host machine with --hostname", -exitval => 2) unless defined $myhost;
     91    pod2usage( -msg => "Define the stage (v0, v1, etc) with --stage", -exitval => 2) unless defined $stage;
    9192   
    92     return ($myhost, $input);
     93    return ($myhost, $input, $stage);
    9394}
    9495
Note: See TracChangeset for help on using the changeset viewer.