📦 Tweaks to install script

- Mostly formatting
This commit is contained in:
2024-07-19 20:40:23 -04:00
parent 0727aaf133
commit 53eff3cf8b
+16 -4
View File
@@ -20,7 +20,7 @@ ask_question() {
} }
# Welcome message # Welcome message
show_message "Welcome to the Rootiest Neovim Installer" show_message "Welcome to the Rootiest Neovim Installer!"
# Look for neovim executable # Look for neovim executable
if ! command -v nvim &>/dev/null; then if ! command -v nvim &>/dev/null; then
@@ -30,7 +30,9 @@ if ! command -v nvim &>/dev/null; then
else else
# Download neovim appimage # Download neovim appimage
mkdir -p ~/AppImages mkdir -p ~/AppImages
wget https://github.com/neovim/neovim/releases/latest/download/nvim.appimage ~/AppImages/nvim.appimage wget \
https://github.com/neovim/neovim/releases/latest/download/nvim.appimage \
-o ~/AppImages/nvim.appimage
chmod +x ~/AppImages/nvim.appimage chmod +x ~/AppImages/nvim.appimage
# Add neovim appimage to PATH # Add neovim appimage to PATH
export PATH=\"\$HOME/AppImages:\$PATH export PATH=\"\$HOME/AppImages:\$PATH
@@ -43,15 +45,25 @@ if ! command -v nvim &>/dev/null; then
fi fi
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 # Initial prompt to proceed with installation
if ! ask_question "Do you want to install the Rootiest Neovim configuration?"; then if ! ask_question \
"Do you want to install the Rootiest Neovim configuration?"; then
show_message "Installation aborted by the user." show_message "Installation aborted by the user."
exit 1 exit 1
fi fi
# Check if existing config is present and move to backup if confirmed # Check if existing config is present and move to backup if confirmed
if [ -d ~/.config/nvim ]; then if [ -d ~/.config/nvim ]; then
if ask_question "Existing Neovim configuration found. Do you want to backup and replace it?"; then if ask_question \
"Existing Neovim configuration found.
Do you want to backup and replace it?"; then
mv ~/.config/nvim ~/.config/nvim.bkp mv ~/.config/nvim ~/.config/nvim.bkp
show_message "Existing configuration has been backed up to ~/.config/nvim.bkp" show_message "Existing configuration has been backed up to ~/.config/nvim.bkp"
else else