From 5a81523bfcd372efdac77fdc14553608ee732b33 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Tue, 21 Jan 2025 13:50:09 +0100 Subject: [PATCH] backup system only saves file when hashes do not match --- misc/backup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/backup.sh b/misc/backup.sh index 75ecac0..faef261 100755 --- a/misc/backup.sh +++ b/misc/backup.sh @@ -9,5 +9,7 @@ if grep -q $(sha256sum $file) backups/sum; then rm $file exit 0 fi +echo 'Writing new hash' +echo $(sha256sum $file) > backups/sum -echo $(sha256sum ) > backups/sum +exit 0