about summary refs log tree commit diff stats
path: root/build.sh
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-09-29 10:57:17 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-09-29 10:57:17 +0200
commit00039ca58b1b44b5ee1e2bfd4dc0d50300d06bf8 (patch)
tree582be06a0bca6a4b9ad62bc1041e48a08348d481 /build.sh
parentmodule/backups: Persist restic cache directory (diff)
downloadnixos-config-00039ca58b1b44b5ee1e2bfd4dc0d50300d06bf8.zip
build.sh: Also deal with stale `result-*` symlinks prime
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index 69798ce8..3cba8fc2 100755
--- a/build.sh
+++ b/build.sh
@@ -23,7 +23,9 @@ check() {
     if [ -s "$file" ]; then
         rm "$file"
     elif ! [ -e "$file" ]; then
-        : "Ignore not existing files"
+        rm "$file" || {
+            : "Ignore not existing files"
+        }
     else
         echo "ERROR: '$file' is not a symlink. Not removing it." 1>&2
         exit 1