install: better link install

Remove links if not already linked before linking
This commit is contained in:
2 * r + 2 * t
2025-02-23 21:23:34 +11:00
parent 557e1e4abe
commit fd14efb773
6 changed files with 16 additions and 13 deletions
+7
View File
@@ -108,3 +108,10 @@ WantedBy=default.target" > $systemd/$module-monitor-scheme.path
systemctl --user start $module-monitor-scheme.service
end
end
function install-link -a from to
if ! test -L $to -a (realpath $to) = (realpath $from)
confirm-overwrite $to
ln -s $from $to
end
end