feat: Install Neovim from nightlies
This commit is contained in:
33
scripts/upstall_neovim_macos.zsh
Normal file
33
scripts/upstall_neovim_macos.zsh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/zsh
|
||||
|
||||
# Determine OS and CPU architecture
|
||||
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
||||
ARCH=$(uname -m)
|
||||
|
||||
if [[ "$OS" == "darwin" ]]; then
|
||||
# macOS installation
|
||||
nightly_url="https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-${ARCH}.tar.gz"
|
||||
install_dir="~/opt"
|
||||
|
||||
mkdir -p "${install_dir/#\~/$HOME}"
|
||||
|
||||
echo "Downloading Neovim nightly for macOS ${ARCH}..."
|
||||
curl -L "$nightly_url" | tar -xz -C "${install_dir/#\~/$HOME}"
|
||||
echo "Neovim nightly installed to ${install_dir}/nvim-macos-${ARCH}"
|
||||
|
||||
elif [[ "$OS" == "linux" ]]; then
|
||||
# Linux installation
|
||||
nightly_url="https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage"
|
||||
install_dir="~/.local/bin"
|
||||
|
||||
mkdir -p "${install_dir/#\~/$HOME}"
|
||||
|
||||
echo "Downloading Neovim nightly AppImage..."
|
||||
curl -L "$nightly_url" -o "${install_dir/#\~/$HOME}/nvim"
|
||||
chmod +x "${install_dir/#\~/$HOME}/nvim"
|
||||
echo "Neovim nightly installed to ${install_dir}/nvim"
|
||||
|
||||
else
|
||||
echo "Unsupported OS: $OS"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user