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
+4 -8
View File
@@ -10,20 +10,16 @@ set -l dist $C_DATA/fish
update-repo fish $dist
# Install fish config
confirm-overwrite $CONFIG/fish/config.fish
ln -s $dist/config.fish $CONFIG/fish/config.fish
install-link $dist/config.fish $CONFIG/fish/config.fish
# Install fish greeting
confirm-overwrite $CONFIG/fish/functions/fish_greeting.fish
mkdir -p $CONFIG/fish/functions
ln -s $dist/fish_greeting.fish $CONFIG/fish/functions/fish_greeting.fish
install-link $dist/fish_greeting.fish $CONFIG/fish/functions/fish_greeting.fish
# Install starship config
confirm-overwrite $CONFIG/starship.toml
ln -s $dist/starship.toml $CONFIG/starship.toml
install-link $dist/starship.toml $CONFIG/starship.toml
# Install fastfetch config
confirm-overwrite $CONFIG/fastfetch/config.jsonc
ln -s $dist/fastfetch.jsonc $CONFIG/fastfetch/config.jsonc
install-link $dist/fastfetch.jsonc $CONFIG/fastfetch/config.jsonc
log 'Done.'