diff options
Diffstat (limited to 'utils')
| -rwxr-xr-x | utils/installer/uninstall.sh | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/utils/installer/uninstall.sh b/utils/installer/uninstall.sh index 597bbf85..8a7256f0 100755 --- a/utils/installer/uninstall.sh +++ b/utils/installer/uninstall.sh @@ -2,6 +2,7 @@  set -eo pipefail  ARGS_REMOVE_BACKUPS=0 +ARGS_REMOVE_CONFIG=0  declare -r XDG_DATA_HOME="${XDG_DATA_HOME:-"$HOME/.local/share"}"  declare -r XDG_CACHE_HOME="${XDG_CACHE_HOME:-"$HOME/.cache"}" @@ -12,16 +13,18 @@ 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 -a __lvim_dirs=( -  "$LUNARVIM_CONFIG_DIR"    "$LUNARVIM_RUNTIME_DIR"    "$LUNARVIM_CACHE_DIR"  ) +__lvim_config_dir="$LUNARVIM_CONFIG_DIR" +  function usage() {    echo "Usage: uninstall.sh [<options>]"    echo ""    echo "Options:"    echo "    -h, --help                       Print this help message" +  echo "    --remove-config                  Remove old backup folders as well"    echo "    --remove-backups                 Remove old backup folders as well"  } @@ -31,6 +34,9 @@ function parse_arguments() {        --remove-backups)          ARGS_REMOVE_BACKUPS=1          ;; +      --remove-config) +        ARGS_REMOVE_CONFIG=1 +        ;;        -h | --help)          usage          exit 0 @@ -41,6 +47,9 @@ function parse_arguments() {  }  function remove_lvim_dirs() { +  if [ "$ARGS_REMOVE_CONFIG" -eq 1 ]; then +    __lvim_dirs+=($__lvim_config_dir) +  fi    for dir in "${__lvim_dirs[@]}"; do      rm -rf "$dir"      if [ "$ARGS_REMOVE_BACKUPS" -eq 1 ]; then | 
