Skip to content

Commit

Permalink
use local path in condition
Browse files Browse the repository at this point in the history
  • Loading branch information
JensDll committed Jul 13, 2023
1 parent db1bc5e commit cb23441
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ __bootstrap_nvim() {

local -r nvim_config_home="${MAPFILE[0]}"
local -r default_nvim_config_home="$HOME/.config/nvim"
local -r local_nvim_config_home="$root/.config/nvim"

local -r nvim_data_home="${MAPFILE[1]}"
local -r default_nvim_data_home="$HOME/.local/share/nvim"
local -r local_nvim_data_home="$root/.local/share/nvim"

if [[ -d $default_nvim_config_home && $default_nvim_config_home != "$nvim_config_home" ]]; then
if [[ -d $local_nvim_config_home && $default_nvim_config_home != "$nvim_config_home" ]]; then
cat << EOF
[Neovim] Detected a non-default ($default_nvim_config_home) config directory, also copying files to: $nvim_config_home
Expand All @@ -42,7 +44,7 @@ EOF
rsync --no-perms --archive --verbose --human-readable "$default_nvim_config_home/" "$nvim_config_home"
fi

if [[ -d $default_nvim_data_home && $default_nvim_data_home != "$nvim_data_home" ]]; then
if [[ -d $local_nvim_data_home && $default_nvim_data_home != "$nvim_data_home" ]]; then
cat << EOF
[Neovim] Detected a non-default ($default_nvim_data_home) data directory, also copying files to: $nvim_data_home
Expand Down

0 comments on commit cb23441

Please sign in to comment.