mk-ca-bundle.pl: avoid warnings with -d without parameter
authorDaniel Stenberg <daniel@haxx.se>
Sun, 5 Jan 2014 22:53:26 +0000 (23:53 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 5 Jan 2014 22:53:26 +0000 (23:53 +0100)
lib/mk-ca-bundle.pl

index 4520085..4b78ff1 100755 (executable)
@@ -64,6 +64,11 @@ $0 =~ s@.*(/|\\)@@;
 $Getopt::Std::STANDARD_HELP_VERSION = 1;
 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.
 my $url = ( defined( $urls{$opt_d} ) ) ? $urls{$opt_d} : $opt_d;