summaryrefslogtreecommitdiff
path: root/Build-tools
diff options
context:
space:
mode:
authorunknown <lenz@mysql.com>2005-01-31 17:33:01 +0100
committerunknown <lenz@mysql.com>2005-01-31 17:33:01 +0100
commit0f7fae73d198a93956e81eb93af1cbf2d3506013 (patch)
treedee30dc79bf0965b5b7b74dd45f59449a655c549 /Build-tools
parentb4ecba65deae2d09596412f3efbaed90943f0e4d (diff)
downloadmariadb-git-0f7fae73d198a93956e81eb93af1cbf2d3506013.tar.gz
- Bootstrap: Rename already existing build directories to something more
useful than *.old.<PID> - use the mtime of configure.in instead. This gives us a time stamp of when this last build directory was created, e.g. "mysql-4.0.24-build-2005-01-31-16:47" Build-tools/Bootstrap: - Rename already existing build directories to something more useful than *.old.<PID> - use the mtime of configure.in instead. This gives us a time stamp of when this last build directory was created, e.g. "mysql-4.0.24-build-2005-01-31-16:47"
Diffstat (limited to 'Build-tools')
-rwxr-xr-xBuild-tools/Bootstrap10
1 files changed, 8 insertions, 2 deletions
diff --git a/Build-tools/Bootstrap b/Build-tools/Bootstrap
index 10ebc5c2dd1..827eb4022d7 100755
--- a/Build-tools/Bootstrap
+++ b/Build-tools/Bootstrap
@@ -210,10 +210,16 @@ if (-d $target_dir)
}
else
{
- &logger("Renaming $target_dir to $target_dir.old." . $$);
+ # Get the time stamp of "configure.in"
+ @stat= stat("$target_dir/configure.in");
+ my $mtime= $stat[9];
+ my ($sec,$min,$hour,$mday,$mon,$year) = localtime($mtime);
+ my $mtime= sprintf("%04d%-02d-%02d-%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min);
+
+ &logger("Renaming $target_dir to $target_dir-$mtime");
$command= "mv ";
$command.= "-v " if ($opt_verbose || defined $opt_log);
- $command.= "$target_dir $target_dir.old." . $$;
+ $command.= "$target_dir $target_dir-$mtime";
&run_command($command, "Could not rename $target_dir!");
}
}