From 108d2bc932fabbc93a5a637e18a84d5963b8ac01 Mon Sep 17 00:00:00 2001 From: rootiest Date: Sat, 27 Jul 2024 07:24:02 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20deprecation(installer):?= =?UTF-8?q?=20remove=20install=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove install script. Users can install neovim on their own. --- install.sh | 88 ------------------------------------------------------ 1 file changed, 88 deletions(-) delete mode 100755 install.sh diff --git a/install.sh b/install.sh deleted file mode 100755 index 10a3fb5..0000000 --- a/install.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash - -# Function to display a message -show_message() { - echo -e "\n==========================================================" - echo -e "$1" - echo -e "==========================================================\n" -} - -# Function to prompt user with a yes/no question -ask_question() { - while true; do - read -rp "$1 [y/n]: " yn - case $yn in - [Yy]*) return 0 ;; - [Nn]*) return 1 ;; - *) echo "Please answer yes or no." ;; - esac - done -} - -# Welcome message -show_message "Welcome to the Rootiest Neovim Installer!" - -# Look for neovim executable -if ! command -v nvim &>/dev/null; then - show_message "Neovim executable not found." - if ! ask_question "Would you like to install it now?"; then - show_message "Installation aborted by the user." - else - # Download neovim appimage - mkdir -p ~/AppImages - wget \ - https://github.com/neovim/neovim/releases/latest/download/nvim.appimage \ - -o ~/AppImages/nvim.appimage - chmod +x ~/AppImages/nvim.appimage - # Add neovim appimage to PATH - export PATH=\"\$HOME/AppImages:\$PATH - # Save neovim appimage to PATH in .bashrc - echo "export PATH=\"\$HOME/AppImages:\$PATH\"" >>~/.bashrc - # Save neovim appimage to PATH in .zshrc - echo "export PATH=\"\$HOME/AppImages:\$PATH\"" >>~/.zshrc - # Save neovim appimage to PATH in .config/fish/config.fish - echo "set PATH \$HOME/AppImages \$PATH" >>~/.config/fish/config.fish - fi -fi - -# Verify neovim executable -if ! command -v nvim &>/dev/null; then - show_message "Neovim installation failed. -Please install it manually and re-run the installer." - exit 1 -fi - -# Initial prompt to proceed with installation -if ! ask_question \ - "Do you want to install the Rootiest Neovim configuration?"; then - show_message "Installation aborted by the user." - exit 1 -fi - -# Check if existing config is present and move to backup if confirmed -if [ -d ~/.config/nvim ]; then - if ask_question \ - "Existing Neovim configuration found. -Do you want to backup and replace it?"; then - mv ~/.config/nvim ~/.config/nvim.bkp - show_message "Existing configuration has been backed up to ~/.config/nvim.bkp" - else - show_message "Operation aborted by the user." - exit 1 - fi -fi - -# Download rootiest neovim config -if git clone https://github.com/rootiest/rootiest-nvim ~/.config/nvim; then - show_message "Rootiest Neovim configuration has been downloaded." -else - show_message "Failed to download the configuration." - exit 1 -fi - -# Start neovim -if ask_question "Do you want to start Neovim now?"; then - nvim -else - show_message "Neovim installation has been completed." -fi