From 054f769d2c88c496e2673a3244a7389f05324bf5 Mon Sep 17 00:00:00 2001 From: slef Date: Mon, 27 Oct 2003 17:39:41 +0000 Subject: [PATCH] Timed backups in installfiles --- misc/Install.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/misc/Install.pm b/misc/Install.pm index 3f84aeecb3..a685d7fbd2 100644 --- a/misc/Install.pm +++ b/misc/Install.pm @@ -1518,15 +1518,14 @@ $messages->{'CopyingFiles'}->{en}="Copying %s to %s.\n"; sub installfiles { #MJR: preserve old files, just in case - #FIXME: use dated backups sub neatcopy { my $desc = shift; my $src = shift; my $tgt = shift; - if (-d $tgt) { - print getmessage('CopyingFiles', ["old ".$desc,$tgt.".old"]); - startsysout; + if (-e $tgt) { + print getmessage('CopyingFiles', ["old ".$desc,$tgt.strftime("%Y%m%d%H%M",localtime())]); + startsysout(); system("mv ".$tgt." ".$tgt.".old"); } -- 2.39.2