Commit 70a539b0 authored by marko's avatar marko

branches/zip: scripts/dynconfig: Minor cleanup (spelling and formatting).

parent 23961f57
#!/usr/bin/perl -w #!/usr/bin/perl -w
# #
# (C)opyright Oracle/Innobase Oy. 2007. # (C)opyright Oracle/Innobase Oy. 2007.
# #
...@@ -11,9 +11,12 @@ ...@@ -11,9 +11,12 @@
# #
# RETURNS: 0 OK # RETURNS: 0 OK
use strict;
use warnings;
my $buffer; my $buffer;
# These are the eninges whose config parameters we need to remove. # These are the engines whose config parameters we need to remove.
my @engines = ( my @engines = (
"ndbcluster", "ndbcluster",
"innodb", "innodb",
...@@ -25,7 +28,7 @@ my @engines = ( ...@@ -25,7 +28,7 @@ my @engines = (
"embedded-server", "embedded-server",
"partition" "partition"
); );
# Map the following variables to something else. If you want to remove any # Map the following variables to something else. If you want to remove any
# parameters from the configure command line, simply add an "" value to the # parameters from the configure command line, simply add an "" value to the
# hashtable below. # hashtable below.
...@@ -103,8 +106,7 @@ sub squeeze($) { ...@@ -103,8 +106,7 @@ sub squeeze($) {
} }
if ($#ARGV < 0) { if ($#ARGV < 0) {
print "usage: <patch/to/mysqlbug> [options e.g. CC=xxx]\n"; die "usage: $0 <path/to/mysqlbug> [options e.g. CC=gcc CXX=gcc]\n";
exit(1);
} }
open(F, $ARGV[0]) || open(F, $ARGV[0]) ||
...@@ -117,12 +119,10 @@ my @matched = grep(/^CONFIGURE_LINE=/, split(/\n/, $buffer)); ...@@ -117,12 +119,10 @@ my @matched = grep(/^CONFIGURE_LINE=/, split(/\n/, $buffer));
# Check for no match # Check for no match
if ($#matched == -1 ) { if ($#matched == -1 ) {
print "CONFIGURE_LINE= not found in : $ARGV[0]\n"; die "CONFIGURE_LINE= not found in : $ARGV[0]\n";
exit(1);
# Check if more than one line matched # Check if more than one line matched
} elsif ($#matched > 0) { } elsif ($#matched > 0) {
printf "Error too many matches found.\n"; die "Error: $#matched matches found.\n";
exit(1);
} }
# Since CONFIGURE_LINE is an environment variable we extract the value, # Since CONFIGURE_LINE is an environment variable we extract the value,
...@@ -153,7 +153,7 @@ if (defined($ENV{"MYSQL_CONFIG_DEL"})) { ...@@ -153,7 +153,7 @@ if (defined($ENV{"MYSQL_CONFIG_DEL"})) {
} }
} }
my @arr = split(/'/, $configure); my @arr = split("'", $configure);
foreach my $param (@arr) { foreach my $param (@arr) {
...@@ -172,7 +172,7 @@ foreach my $param (@arr) { ...@@ -172,7 +172,7 @@ foreach my $param (@arr) {
$param = map_param($param); $param = map_param($param);
if (length($param) > 0) { if (length($param) > 0) {
print "'$param' "; print " '$param'";
} }
} }
...@@ -186,9 +186,10 @@ if (defined($ENV{"MYSQL_CONFIG_ADD"})) { ...@@ -186,9 +186,10 @@ if (defined($ENV{"MYSQL_CONFIG_ADD"})) {
if ($param =~ /^'(.+)'$/) { if ($param =~ /^'(.+)'$/) {
$param = $1; $param = $1;
} }
print "'$param' "; print " '$param'";
} }
} }
exit(0); print "\n";
exit(0);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment