From 31ceba56dc0f7087581e4f95fa228660ec8a6c70 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Tue, 30 Apr 2019 19:18:57 +0200 Subject: [PATCH] dotfiles script v0.4.3 - install: add check if .bash_completion already exists but is not a link to .dotfiles --- bin/dotfiles | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/dotfiles b/bin/dotfiles index c5dfe17..2ec05ab 100755 --- a/bin/dotfiles +++ b/bin/dotfiles @@ -2,7 +2,7 @@ ## ## binaryDiv's dotfiles management script -## Version 0.4.2 +## Version 0.4.3 ## usage() { @@ -82,6 +82,8 @@ case "$cmd" in echo "* Installing user-defined bash completion (~/.bash_completion.d/)" "$0" link -q "$bashcompletion_filename" && show_bash_restart_info=1 + elif [[ ! "$(realpath "$homedir/$bashcompletion_filename")" -ef "$dotfilesdir/$bashcompletion_filename" ]]; then + echo "! Warning: File $homedir/$bashcompletion_filename already exists but is NOT a link to $dotfilesdir/$bashcompletion_filename" fi mkdir -p "$homedir/.bash_completion.d"