Last active
May 8, 2024 12:32
-
-
Save ashemedai/21a4e34b71cfadb28326b7406a15c601 to your computer and use it in GitHub Desktop.
neovim fetch and install script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "${1}" ]; then | |
echo "Enter nvim release number" | |
read VERSION | |
else | |
VERSION=${1} | |
fi | |
ARCHIVE="nvim-linux64.tar.gz" | |
URL="https://github.com/neovim/neovim/releases/download/v${VERSION}/${ARCHIVE}" | |
INSTALL_HOME="${HOME}/.local" | |
RUNTIME_DIR="share/nvim/runtime" | |
fetch () { | |
echo "Fetching nvim archive from '${URL}'" | |
curl -sSLO "${URL}" | |
} | |
extract () { | |
echo "Removing runtime directory at '${INSTALL_HOME}/${RUNTIME_DIR}'" | |
rm -rfI "${INSTALL_HOME}/${RUNTIME_DIR}" | |
tar -x -f "${ARCHIVE}" -C "${INSTALL_HOME}" -v -z --strip-components=1 | |
} | |
fetch | |
extract |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment