- Timestamp:
- Mar 23, 2023, 2:05:41 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/get_md5s_instances.pl
r42411 r42430 11 11 use Getopt::Long qw( GetOptions :config auto_help auto_version ); 12 12 13 # USAGE: get_md5s_instances.pl --hostname (hostname) --input (file) 13 # USAGE: get_md5s_instances.pl --hostname (hostname) --input (file) --stage (v0,v1,etc) 14 14 15 my ($myhost, $input ) = &parse_cmdopts;15 my ($myhost, $input, $stage) = &parse_cmdopts; 16 16 17 17 # check that we are running this script on 'myhost' … … 23 23 24 24 my $output = $input; 25 $output =~ s/inst /md5s/;25 $output =~ s/inst.$stage/md5s/; 26 26 27 27 if ($output eq $input) { die "output file ($output) matches input file ($input)\n"; } … … 84 84 sub parse_cmdopts { 85 85 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); 88 88 89 89 pod2usage( -msg => "Provide the input list with --input", -exitval => 2) unless defined $input; 90 90 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; 91 92 92 return ($myhost, $input );93 return ($myhost, $input, $stage); 93 94 } 94 95
Note:
See TracChangeset
for help on using the changeset viewer.
