mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Added support for --help and --version options.
This commit is contained in:
parent
8efd74de46
commit
c3fa3aaf2c
@ -44,6 +44,7 @@ my $version = '1.18';
|
||||
|
||||
$opt_w = 76; # default base64 encoded lines length
|
||||
|
||||
$Getopt::Std::STANDARD_HELP_VERSION = 1;
|
||||
getopts('bfhilnqtuvw:');
|
||||
|
||||
if ($opt_i) {
|
||||
@ -59,7 +60,7 @@ if ($opt_i) {
|
||||
}
|
||||
|
||||
$0 =~ s@.*(/|\\)@@;
|
||||
if ($opt_h) {
|
||||
sub HELP_MESSAGE() {
|
||||
print "Usage:\t${0} [-b] [-f] [-i] [-l] [-n] [-q] [-t] [-u] [-v] [-w<l>] [<outputfile>]\n";
|
||||
print "\t-b\tbackup an existing version of ca-bundle.crt\n";
|
||||
print "\t-f\tforce rebuild even if certdata.txt is current\n";
|
||||
@ -74,6 +75,12 @@ if ($opt_h) {
|
||||
exit;
|
||||
}
|
||||
|
||||
sub VERSION_MESSAGE() {
|
||||
print "${0} version ${version} running on Perl ${]} on ${^O}\n";
|
||||
}
|
||||
|
||||
HELP_MESSAGE() if ($opt_h);
|
||||
|
||||
my $crt = $ARGV[0] || 'ca-bundle.crt';
|
||||
(my $txt = $url) =~ s@(.*/|\?.*)@@g;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user