signing.pl (7e90fac2) | signing.pl (c625247e) |
---|---|
1: 2eval 'exec perl -wS $0 ${1+"$@"}' 3 if 0; 4#************************************************************** 5# 6# Licensed to the Apache Software Foundation (ASF) under one 7# or more contributor license agreements. See the NOTICE file 8# distributed with this work for additional information --- 68 unchanged lines hidden (view full) --- 77} 78 79############################################################################ 80sub parse_options #09.07.2007 08:13 81############################################################################ 82{ 83 # e exclude list file 84 # v verbose | 1: 2eval 'exec perl -wS $0 ${1+"$@"}' 3 if 0; 4#************************************************************** 5# 6# Licensed to the Apache Software Foundation (ASF) under one 7# or more contributor license agreements. See the NOTICE file 8# distributed with this work for additional information --- 68 unchanged lines hidden (view full) --- 77} 78 79############################################################################ 80sub parse_options #09.07.2007 08:13 81############################################################################ 82{ 83 # e exclude list file 84 # v verbose |
85 my $filelist_filename = undef; |
|
85 my $success = GetOptions('h' => \$opt_help, 86 'd=s' => \$opt_dir, 'e=s'=>\$opt_exclude, 'f=s'=>\$opt_pfxfile, 'l=s'=>\$opt_log, | 86 my $success = GetOptions('h' => \$opt_help, 87 'd=s' => \$opt_dir, 'e=s'=>\$opt_exclude, 'f=s'=>\$opt_pfxfile, 'l=s'=>\$opt_log, |
87 'p=s'=>\$opt_pass,'v'=>\$opt_verbose, 't=s'=>\$opt_timestamp_url); | 88 'p=s'=>\$opt_pass,'v'=>\$opt_verbose, 't=s'=>\$opt_timestamp_url, 'i=s'=>\$filelist_filename); |
88 if ( !$success || $opt_help ) { 89 usage(); 90 exit(1); 91 } 92 if ( !$opt_exclude || !$opt_pfxfile || !$opt_pass || !$opt_timestamp_url) { 93 print "ERROR: Parameter missing!\n!"; 94 usage(); 95 exit(1); 96 } | 89 if ( !$success || $opt_help ) { 90 usage(); 91 exit(1); 92 } 93 if ( !$opt_exclude || !$opt_pfxfile || !$opt_pass || !$opt_timestamp_url) { 94 print "ERROR: Parameter missing!\n!"; 95 usage(); 96 exit(1); 97 } |
97 return @ARGV; | 98 99 # Read the names of files to sign from the given file. 100 die "no list of files given" unless defined $filelist_filename; 101 open my $in, $filelist_filename; 102 my @filelist = (); 103 while (<$in>) 104 { 105 chomp($_); 106 push @filelist, $_; 107 } 108 return @filelist; |
98} ##parse_options 99 100############################################################################ 101sub get_exclude_files #09.07.2007 10:12 102############################################################################ 103{ 104 if ( -e $opt_exclude ) { 105 # get data from cache file --- 140 unchanged lines hidden (view full) --- 246 close LOG if ($opt_log); # logging 247 exit(1); 248} ##print_error 249 250############################################################################ 251sub usage #09.07.2007 08:39 252############################################################################ 253 { | 109} ##parse_options 110 111############################################################################ 112sub get_exclude_files #09.07.2007 10:12 113############################################################################ 114{ 115 if ( -e $opt_exclude ) { 116 # get data from cache file --- 140 unchanged lines hidden (view full) --- 257 close LOG if ($opt_log); # logging 258 exit(1); 259} ##print_error 260 261############################################################################ 262sub usage #09.07.2007 08:39 263############################################################################ 264 { |
254 print "Usage:\t $myname <-e filename> <-f filename> <-p password> <-t timestamp> [-l filename] [-v] <file[list]> \n"; | 265 print "Usage:\t $myname <-e filename> <-f filename> <-p password> <-t timestamp> <-i filename> [-l filename] [-v]\n"; |
255 print "Options:\n"; 256 print "\t -e filename\t\t\tFile which contains a list of files which don't have to be signed.\n"; 257 print "Mandatory.\n"; 258 print "\t -f pfx_filename\t\t\"Personal Information Exchange\" file. "; 259 print "Mandatory.\n"; 260 print "\t -p password\t\t\tPassword for \"Personal Information Exchange\" file. Mandatory.\n"; 261 print "\t -t timestamp\t\t\tTimestamp URL e.g. \"http://timestamp.verisign.com/scripts/timstamp.dll\"\n"; | 266 print "Options:\n"; 267 print "\t -e filename\t\t\tFile which contains a list of files which don't have to be signed.\n"; 268 print "Mandatory.\n"; 269 print "\t -f pfx_filename\t\t\"Personal Information Exchange\" file. "; 270 print "Mandatory.\n"; 271 print "\t -p password\t\t\tPassword for \"Personal Information Exchange\" file. Mandatory.\n"; 272 print "\t -t timestamp\t\t\tTimestamp URL e.g. \"http://timestamp.verisign.com/scripts/timstamp.dll\"\n"; |
273 print "\t -i filename\t\t\tName of the file that contains the names of files to sign.\"\n"; |
|
262 print "\t\t\t\t\tMandatory.\n"; 263 print "\t -l log_filename\t\tFile for logging.\n"; 264 print "\t -v\t\t\t\tVerbose.\n"; 265} ##usage | 274 print "\t\t\t\t\tMandatory.\n"; 275 print "\t -l log_filename\t\tFile for logging.\n"; 276 print "\t -v\t\t\t\tVerbose.\n"; 277} ##usage |
266 267 268 269 | |