summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Collerton <tom.coll91@gmail.com>2012-02-29 11:50:02 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-02-29 11:33:35 +0000
commit39d026a11fc67bc45fc974fe8eab04ef9499fa31 (patch)
treed555f32fb7328fba19158db25dc25f7830b5d60f
parent1744010821be1ebcbfdf0f67ef3eda98d9f3e7b0 (diff)
fdo#46565: perl / autogen.sh should backup autogen.lastrun
-rwxr-xr-xautogen.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index d41ccdd91928..2133d075800e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -144,6 +144,10 @@ if (defined $ENV{NOCONFIGURE}) {
# Save autogen.lastrun only if we did get some arguments on the command-line
if (@ARGV) {
if (scalar(@cmdline_args) > 0) {
+ # if there's already an autogen.lastrun, make a backup first
+ if (-e "autogen.lastrun") {
+ system("cp autogen.lastrun autogen.lastrun.bak");
+ }
# print "writing args to autogen.lastrun\n";
my $fh;
open ($fh, ">autogen.lastrun") || die "can't open autogen.lastrun: $!";