mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-07 07:49:30 -05:00
install: better link install
Remove links if not already linked before linking
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user