use argument to specify output filename if present.
This commit is contained in:
parent
586444b6b8
commit
c764331dd9
@ -36,8 +36,6 @@ use MIME::Base64;
|
|||||||
use LWP::UserAgent;
|
use LWP::UserAgent;
|
||||||
|
|
||||||
my $url = 'http://lxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1';
|
my $url = 'http://lxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1';
|
||||||
my $crt = 'ca-bundle.crt';
|
|
||||||
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';
|
||||||
|
|
||||||
@ -45,7 +43,7 @@ getopts('hilnuv');
|
|||||||
|
|
||||||
if ($opt_h) {
|
if ($opt_h) {
|
||||||
$0 =~ s/\\/\//g;
|
$0 =~ s/\\/\//g;
|
||||||
printf("Usage:\t%s [-i] [-l] [-n] [-u] [-v]\n", substr($0, rindex($0, '/') + 1));
|
printf("Usage:\t%s [-i] [-l] [-n] [-u] [-v] [<outputfile>]\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-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";
|
||||||
@ -62,6 +60,8 @@ if ($opt_i) {
|
|||||||
print ("=" x 78 . "\n");
|
print ("=" x 78 . "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $crt = $ARGV[0] || 'ca-bundle.crt';
|
||||||
|
my $tmp = 'mytmpfile.txt';
|
||||||
my $txt = substr($url, rindex($url, '/') + 1);
|
my $txt = substr($url, rindex($url, '/') + 1);
|
||||||
$txt =~ s/\?.*//;
|
$txt =~ s/\?.*//;
|
||||||
if (!$opt_n) {
|
if (!$opt_n) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user