summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-11-04 21:07:38 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-11-05 22:47:43 +0100
commita1e0777f47e42cc060436393fe47e0d58c837915 (patch)
tree539fc412b53d97be2dcdabd0b6ff3b87b7b9728c /scripts
parentflake.nix: Add `nvd` to devshell (diff)
downloadnixos-config-a1e0777f47e42cc060436393fe47e0d58c837915.zip
scripts/build.sh: Really only delete symlinks
I have no idea what I was thinking with the previous `if` conditions. They might be a Chesterton’s Fence, but it works in my computer.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 2bbb00f1..b311eb65 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -21,12 +21,8 @@ build_system() {
}
remove_symlink() {
link="$1"
- if [ -s "$link" ]; then
+ if [ -L "$link" ]; then
rm "$link"
- elif ! [ -e "$link" ]; then
- rm "$link" || {
- : "Ignore not existing files"
- }
else
echo "ERROR: '$link' is not a symlink. Not removing it." 1>&2
exit 1