fixed regex to fetch certdata.txt version since it was replaced by CVS (argh!)
added a switch to display certdata.txt version header.
This commit is contained in:
parent
ce1649564c
commit
586444b6b8
@ -41,12 +41,13 @@ my $tmp = 'mytmpfile.txt';
|
|||||||
# If the OpenSSL commandline is not in search path you can configure it here!
|
# If the OpenSSL commandline is not in search path you can configure it here!
|
||||||
my $openssl = 'openssl';
|
my $openssl = 'openssl';
|
||||||
|
|
||||||
getopts('hinuv');
|
getopts('hilnuv');
|
||||||
|
|
||||||
if ($opt_h) {
|
if ($opt_h) {
|
||||||
$0 =~ s/\\/\//g;
|
$0 =~ s/\\/\//g;
|
||||||
printf("Usage:\t%s [-i] [-n] [-u] [-v]\n", substr($0, rindex($0, '/') + 1));
|
printf("Usage:\t%s [-i] [-l] [-n] [-u] [-v]\n", substr($0, rindex($0, '/') + 1));
|
||||||
print "\t-i\tprint version info about used modules\n";
|
print "\t-i\tprint version info about used modules\n";
|
||||||
|
print "\t-l\tprint license info about certdata.txt\n";
|
||||||
print "\t-n\tno download of certdata.txt (to use existing)\n";
|
print "\t-n\tno download of certdata.txt (to use existing)\n";
|
||||||
print "\t-u\tunlink (remove) certdata.txt after processing\n";
|
print "\t-u\tunlink (remove) certdata.txt after processing\n";
|
||||||
print "\t-v\tbe verbose and print out processed CAs\n";
|
print "\t-v\tbe verbose and print out processed CAs\n";
|
||||||
@ -108,8 +109,10 @@ while (<TXT>) {
|
|||||||
if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) {
|
if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) {
|
||||||
open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
|
open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
|
||||||
print CRT;
|
print CRT;
|
||||||
|
print if ($opt_l);
|
||||||
while (<TXT>) {
|
while (<TXT>) {
|
||||||
print CRT;
|
print CRT;
|
||||||
|
print if ($opt_l);
|
||||||
last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/);
|
last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/);
|
||||||
}
|
}
|
||||||
close(CRT) or die "Couldn't close $crt: $!";
|
close(CRT) or die "Couldn't close $crt: $!";
|
||||||
@ -117,7 +120,7 @@ while (<TXT>) {
|
|||||||
next if /^#/;
|
next if /^#/;
|
||||||
next if /^\s*$/;
|
next if /^\s*$/;
|
||||||
chomp;
|
chomp;
|
||||||
if (/(\$RCSfile$\s+\$Revision$\s+\$Date$)\"/) {
|
if (/^CVS_ID\s+\"(.*)\"/) {
|
||||||
open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
|
open(CRT, ">>$crt") or die "Couldn't open $crt: $!";
|
||||||
print CRT "# $1\n";
|
print CRT "# $1\n";
|
||||||
close(CRT) or die "Couldn't close $crt: $!";
|
close(CRT) or die "Couldn't close $crt: $!";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user