From 79f1902845260be430fa3a41e21e0f72c66aefa4 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 19 Nov 2021 22:41:14 +0200
Subject: [PATCH] fixup! Don't complain on missing files.

---
 backup/backup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backup/backup b/backup/backup
index a3ea414..8bfaaa5 100755
--- a/backup/backup
+++ b/backup/backup
@@ -36,7 +36,7 @@ NR>2 {
         image_url = registry "/" $1 ":" $(i)
         image_file = dest "/" $1 "/" $(i) ".tar"
         printf "Saving %s to %s.\n", image_url, image_file
-        system("[ -f " image_file " ] || rm " image_file)
+        system("[ ! -f " image_file " ] || rm " image_file)
         if (system("skopeo copy docker://" image_url " docker-archive://" image_file) == 0)
             printf "Backup of %s was successful.\n", image_url
         else {
-- 
GitLab