Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello all,
this patch accomplishes what the EasyHack requests =)
From f8d4e76d5ac123264f22a79ecf6dcc766c3bab5d Mon Sep 17 00:00:00 2001
From: Thomas Collerton <tom.coll91@gmail.com>
Date: Wed, 29 Feb 2012 11:50:02 +0100
Subject: [PATCH] fdo#46565: perl / autogen.sh should backup autogen.lastrun

---
 autogen.sh |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/autogen.sh b/autogen.sh
index d41ccdd..2133d07 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: $!";
-- 
1.7.9.2


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.