diff --git a/dotfiles/.bashrc_paths_example b/dotfiles/.bashrc_paths_example index 5453c21..153e33f 100644 --- a/dotfiles/.bashrc_paths_example +++ b/dotfiles/.bashrc_paths_example @@ -3,7 +3,7 @@ # When a tool (cargo, nvm, conda, etc.) appends lines to .bashrc, move them here instead. # Neovim (installed by install_neovim.sh) -# [ -d /opt/nvim-linux64/bin ] && export PATH="/opt/nvim-linux64/bin:$PATH" +# [ -d /opt/nvim-linux-x86_64/bin ] && export PATH="/opt/nvim-linux-x86_64/bin:$PATH" # Lua language server # export PATH="$PATH:$HOME/lua-language-server/bin" diff --git a/install_neovim.sh b/install_neovim.sh index d9f3227..a9076f2 100755 --- a/install_neovim.sh +++ b/install_neovim.sh @@ -8,8 +8,8 @@ echo "" echo "This script will run the following commands with sudo:" echo " - apt-get update (if curl not installed)" echo " - apt-get install -y curl (if needed)" -echo " - rm -rf /opt/nvim-linux64 (if old installation exists)" -echo " - tar -C /opt -xzf nvim-linux64.tar.gz" +echo " - rm -rf /opt/nvim-linux64 or /opt/nvim-linux-x86_64 (if old installation exists)" +echo " - tar -C /opt -xzf nvim-linux-x86_64.tar.gz" echo "" read -p "Continue with installation? (y/N) " -n 1 -r echo @@ -39,7 +39,7 @@ echo "Downloading Neovim..." TEMP_DIR=$(mktemp -d) cd "$TEMP_DIR" -if ! curl -fsSL -o nvim-linux64.tar.gz https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz; then +if ! curl -fsSL -o nvim-linux-x86_64.tar.gz https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz; then echo "Error: Failed to download Neovim" >&2 rm -rf "$TEMP_DIR" exit 1 @@ -48,13 +48,16 @@ fi echo "Download complete." set -x -# Remove old installation if it exists +# Remove old installation if it exists (either naming convention) if [ -d /opt/nvim-linux64 ]; then sudo rm -rf /opt/nvim-linux64 fi +if [ -d /opt/nvim-linux-x86_64 ]; then + sudo rm -rf /opt/nvim-linux-x86_64 +fi # Extract to /opt -sudo tar -C /opt -xzf nvim-linux64.tar.gz +sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz set +x @@ -65,13 +68,13 @@ rm -rf "$TEMP_DIR" echo "" echo "============================================" # Verify installation -if [ -x /opt/nvim-linux64/bin/nvim ]; then +if [ -x /opt/nvim-linux-x86_64/bin/nvim ]; then echo "Neovim installed successfully!" - /opt/nvim-linux64/bin/nvim --version | head -n1 + /opt/nvim-linux-x86_64/bin/nvim --version | head -n1 echo "" - echo "Neovim is installed at: /opt/nvim-linux64/bin/nvim" + echo "Neovim is installed at: /opt/nvim-linux-x86_64/bin/nvim" echo "Add to PATH by adding this to your ~/.bashrc:" - echo ' export PATH="$PATH:/opt/nvim-linux64/bin"' + echo ' export PATH="$PATH:/opt/nvim-linux-x86_64/bin"' else echo "Error: Neovim installation failed" >&2 exit 1