From 7d9d56d4532343c6cbbfec027389ce1f0e3d1147 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Thu, 2 Feb 2017 18:26:39 -0400 Subject: [PATCH] AK2: make backup only backup when needing backup --- tools/ak2-core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ak2-core.sh b/tools/ak2-core.sh index 319a398..31995ec 100755 --- a/tools/ak2-core.sh +++ b/tools/ak2-core.sh @@ -148,7 +148,7 @@ write_boot() { } # backup_file -backup_file() { cp $1 $1~; } +backup_file() { test ! -f $1~ && cp $1 $1~; } # replace_string replace_string() {