1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

mk-ca-bundle.pl: avoid warnings with -d without parameter

This commit is contained in:
Daniel Stenberg 2014-01-05 23:53:26 +01:00
parent d5f1590d5c
commit 619d1704ae

View File

@ -64,6 +64,11 @@ $0 =~ s@.*(/|\\)@@;
$Getopt::Std::STANDARD_HELP_VERSION = 1; $Getopt::Std::STANDARD_HELP_VERSION = 1;
getopts('bd:fhilnqtuvw:'); getopts('bd:fhilnqtuvw:');
if(!defined($opt_d)) {
# to make plain "-d" use not cause warnings, and actually still work
$opt_d = 'release';
}
# Use predefined URL or else custom URL specified on command line. # Use predefined URL or else custom URL specified on command line.
my $url = ( defined( $urls{$opt_d} ) ) ? $urls{$opt_d} : $opt_d; my $url = ( defined( $urls{$opt_d} ) ) ? $urls{$opt_d} : $opt_d;