diff options
author | kylo252 <[email protected]> | 2023-04-12 18:46:29 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-04-12 12:46:29 -0400 |
commit | a0b2a0e9bff3a32b55393ca926873eb49ce044be (patch) | |
tree | 47e3691f8a2a50e27060d383b032116504f73c46 /utils/installer/uninstall.sh | |
parent | 1e1e7bb4f5489cfbef693f3b9a269b0287d4b455 (diff) |
feat(installer): allow customizing NVIM_APPNAME (#3896)
Diffstat (limited to 'utils/installer/uninstall.sh')
-rwxr-xr-x | utils/installer/uninstall.sh | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/utils/installer/uninstall.sh b/utils/installer/uninstall.sh index 96dea8cd..5a7e6897 100755 --- a/utils/installer/uninstall.sh +++ b/utils/installer/uninstall.sh @@ -8,9 +8,12 @@ declare -r XDG_DATA_HOME="${XDG_DATA_HOME:-"$HOME/.local/share"}" declare -r XDG_CACHE_HOME="${XDG_CACHE_HOME:-"$HOME/.cache"}" declare -r XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"$HOME/.config"}" -declare -r LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-"$XDG_DATA_HOME/lunarvim"}" -declare -r LUNARVIM_CONFIG_DIR="${LUNARVIM_CONFIG_DIR:-"$XDG_CONFIG_HOME/lvim"}" -declare -r LUNARVIM_CACHE_DIR="${LUNARVIM_CACHE_DIR:-"$XDG_CACHE_HOME/lvim"}" +declare -xr NVIM_APPNAME="${NVIM_APPNAME:-"lvim"}" + +declare -xr LUNARVIM_RUNTIME_DIR="${LUNARVIM_RUNTIME_DIR:-"$XDG_DATA_HOME/lunarvim"}" +declare -xr LUNARVIM_CONFIG_DIR="${LUNARVIM_CONFIG_DIR:-"$XDG_CONFIG_HOME/$NVIM_APPNAME"}" +declare -xr LUNARVIM_CACHE_DIR="${LUNARVIM_CACHE_DIR:-"$XDG_CACHE_HOME/$NVIM_APPNAME"}" +declare -xr LUNARVIM_BASE_DIR="${LUNARVIM_BASE_DIR:-"$LUNARVIM_RUNTIME_DIR/$NVIM_APPNAME"}" declare -a __lvim_dirs=( "$LUNARVIM_RUNTIME_DIR" @@ -59,13 +62,7 @@ function remove_lvim_dirs() { } function remove_lvim_bin() { - local legacy_bin="/usr/local/bin/lvim " - if [ -x "$legacy_bin" ]; then - echo "Error! Unable to remove $legacy_bin without elevation. Please remove manually." - exit 1 - fi - - lvim_bin="$(command -v lvim 2>/dev/null)" + lvim_bin="$(command -v "$NVIM_APPNAME" 2>/dev/null)" rm -f "$lvim_bin" } |