aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSoispha Peetz <soispha@b-peetz.de>2026-11-04 21:07:38 +0100
committerSoispha Peetz <soispha@b-peetz.de>2026-11-27 00:55:52 +0100
commitdcaec43c9c5606607dfae45b1646331e58dc4445 (patch)
treea555200be57434677a3c6cf79c45e62fad4a2653 /scripts
parentflake.nix: Add `nvd` to devshell (diff)
downloadnixos-server-dcaec43c9c5606607dfae45b1646331e58dc4445.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 2bbb00f..b311eb6 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