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
+1
View File
@@ -3,6 +3,7 @@
. (dirname (status filename))/util.fish
function confirm-copy -a from to
test -L $to -a (realpath $to) = (realpath $from) && return
if test -e $to
read -l -p "input '$(realpath $to) already exists. Overwrite? [y/N] ' -n" confirm
test "$confirm" = 'y' -o "$confirm" = 'Y' && log 'Continuing.' || return