diff options
author | unknown <lenz@mysql.com> | 2003-12-13 03:49:50 +0100 |
---|---|---|
committer | unknown <lenz@mysql.com> | 2003-12-13 03:49:50 +0100 |
commit | f246ca803d1c037a0f372fdffdb98d659679f915 (patch) | |
tree | a284cc435c5a37284226d056596ee285c16f65b4 /Build-tools | |
parent | 2cdf95dbcfaeaaad1a93571e7773a5d8dd1c3d6e (diff) | |
download | mariadb-git-f246ca803d1c037a0f372fdffdb98d659679f915.tar.gz |
- Some small Perl enhancements for Do-compile: use more Perl builtins.
Build-tools/Do-compile:
- use more Perl builtins (e.g. hostname(), basename()) instead of forking
subprocesses
Diffstat (limited to 'Build-tools')
-rwxr-xr-x | Build-tools/Do-compile | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index e5783dbf515..e92654ccffd 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -1,6 +1,8 @@ #!/usr/bin/perl -w +use File::Basename; use Getopt::Long; +use Sys::Hostname; @config_options= (); @make_options= (); @@ -75,7 +77,7 @@ if (@config_env > 0) $opt_config_env= join(" ", @config_env); } -chomp($host=`hostname`); +$host= hostname(); chomp($uname=`uname`); $full_host_name=$host; $connect_option= ($opt_tcpip ? "--host=$host" : ""); @@ -83,7 +85,7 @@ $host =~ /^([^.-]*)/; $host=$1 . $opt_suffix; $email="$opt_user\@mysql.com"; chomp($pwd = `pwd`); -$VER= `basename $opt_distribution`; chop $VER; +$VER= basename($opt_distribution); $VER=~ /mysql.*-([1-9]\.[0-9]{1,2}\.[0-9]{1,2}.*)\.tar*/; $version=$1; ($major, $minor, $release) = split(/\./,$version); $log="$pwd/Logs/$host-$major.$minor$opt_version_suffix.log"; @@ -110,7 +112,7 @@ if (defined($gcc_version) && ! $opt_config_env) $new_opt_tmp=0; if ($opt_tmp) { - if (! -d $opt_tmp) + unless (-d $opt_tmp) { safe_system("mkdir $opt_tmp"); $new_opt_tmp=1; |