1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

- 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
This commit is contained in:
unknown
2003-12-13 03:49:50 +01:00
parent 2cdf95dbcf
commit f246ca803d

View File

@@ -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;