diff options
author | kylo252 <[email protected]> | 2022-04-27 17:38:06 +0200 |
---|---|---|
committer | kylo252 <[email protected]> | 2022-04-27 17:38:06 +0200 |
commit | f3750313da239d4a9018195c91e74596e36a794a (patch) | |
tree | d023a2de6a2819bf5b16010dd02ed68ccdd2d0e8 /utils | |
parent | e81d24e3c34cc9718b74de3c0f294c53fcbe82a8 (diff) | |
parent | 3de829e76ed3d90b25250b1ab76f6425146af9d2 (diff) |
Merge branch 'rolling'
Diffstat (limited to 'utils')
-rw-r--r-- | utils/installer/install.ps1 | 2 | ||||
-rwxr-xr-x | utils/installer/install.sh | 43 |
2 files changed, 31 insertions, 14 deletions
diff --git a/utils/installer/install.ps1 b/utils/installer/install.ps1 index 182e7bac..31f862f3 100644 --- a/utils/installer/install.ps1 +++ b/utils/installer/install.ps1 @@ -82,7 +82,7 @@ function print_missing_dep_msg($dep) { Write-Output "Please install it first and re-run the installer." } -$winget_package_matrix=@{"git" = "Git.Git"; "nvim" = "nvim.nvim"; "make" = "GnuWin32.Make"; "node" = "OpenJS.NodeJS"; "pip" = "Python.Python.3"} +$winget_package_matrix=@{"git" = "Git.Git"; "nvim" = "Neovim.Neovim"; "make" = "GnuWin32.Make"; "node" = "OpenJS.NodeJS"; "pip" = "Python.Python.3"} $scoop_package_matrix=@{"git" = "git"; "nvim" = "neovim-nightly"; "make" = "make"; "node" = "nodejs"; "pip" = "python3"} function install_system_package($dep) { diff --git a/utils/installer/install.sh b/utils/installer/install.sh index b44880bd..66149cf6 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -85,6 +85,25 @@ function msg() { printf "%s\n" "$text" } +function confirm() { + local question="$1" + while true; do + msg "$question" + read -p "[y]es or [n]o (default: no) : " -r answer + case "$answer" in + y | Y | yes | YES | Yes) + return 0 + ;; + n | N | no | NO | No | *[[:blank:]]* | "") + return 1 + ;; + *) + msg "Please answer [y]es or [n]o." + ;; + esac + done +} + function main() { parse_arguments "$@" @@ -97,17 +116,15 @@ function main() { if [ "$ARGS_INSTALL_DEPENDENCIES" -eq 1 ]; then if [ "$INTERACTIVE_MODE" -eq 1 ]; then - msg "Would you like to install LunarVim's NodeJS dependencies?" - read -p "[y]es or [n]o (default: no) : " -r answer - [ "$answer" != "${answer#[Yy]}" ] && install_nodejs_deps - - msg "Would you like to install LunarVim's Python dependencies?" - read -p "[y]es or [n]o (default: no) : " -r answer - [ "$answer" != "${answer#[Yy]}" ] && install_python_deps - - msg "Would you like to install LunarVim's Rust dependencies?" - read -p "[y]es or [n]o (default: no) : " -r answer - [ "$answer" != "${answer#[Yy]}" ] && install_rust_deps + if confirm "Would you like to install LunarVim's NodeJS dependencies?"; then + install_nodejs_deps + fi + if confirm "Would you like to install LunarVim's Python dependencies?"; then + install_python_deps + fi + if confirm "Would you like to install LunarVim's Rust dependencies?"; then + install_rust_deps + fi else install_nodejs_deps install_python_deps @@ -180,11 +197,11 @@ function print_missing_dep_msg() { } function check_neovim_min_version() { - local verify_version_cmd='if !has("nvim-0.6.1") | cquit | else | quit | endif' + local verify_version_cmd='if !has("nvim-0.7") | cquit | else | quit | endif' # exit with an error if min_version not found if ! nvim --headless -u NONE -c "$verify_version_cmd"; then - echo "[ERROR]: LunarVim requires at least Neovim v0.6.1 or higher" + echo "[ERROR]: LunarVim requires at least Neovim v0.7 or higher" exit 1 fi } |