diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-09-16 14:58:23 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-09-16 14:58:23 +0200 |
| commit | cb71b3bd2e3394ccecc2fb39965290ad9810ead3 (patch) | |
| tree | 25c66589dbb579c74c132e8c92771dacc0d48689 /neovim.sh | |
| parent | e22d899ce184f9d4765d99d617ecbf641d040f55 (diff) | |
| download | dotfiles-cb71b3bd2e3394ccecc2fb39965290ad9810ead3.tar.gz dotfiles-cb71b3bd2e3394ccecc2fb39965290ad9810ead3.zip | |
Ask user if they want to install neovim if not installed
Diffstat (limited to 'neovim.sh')
| -rwxr-xr-x | neovim.sh | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -311,11 +311,25 @@ check_dependencies # Check for privilege escalation tools check_privilege_tools -# Check if Neovim is already installed +# Check if Neovim is already installed and ask the user if want to install it if check_neovim_installed; then printf "${GREEN}Neovim is already installed!${NC}\n" else - choose_version + printf "${RED}Neovim is not installed.${NC}\n" + read -p "Install Neovim? (y/n): " install_choice + + case $install_choice in + [Yy] ) + choose_version + ;; + [Nn] ) + echo "Exiting..." + exit + ;; + * ) + handle_error "Invalid choice. Please enter 'y' for yes or 'n' for no." + ;; + esac fi # Function to check for updates and display breaking changes |
