dotfiles script v0.4.3

- install: add check if .bash_completion already exists but is not a link to .dotfiles
This commit is contained in:
Lexi / Zoe 2019-04-30 19:18:57 +02:00
parent 938f270f9f
commit 31ceba56dc
1 changed files with 3 additions and 1 deletions

View File

@ -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"