Remove update-neovim.sh tarball installer — neovim comes from system package (pacman), topgrade keeps it current
This commit is contained in:
parent
bdcf11467a
commit
f692fbf01e
3 changed files with 2 additions and 109 deletions
|
|
@ -200,53 +200,8 @@ if command -v bun >/dev/null 2>&1; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Neovim — install official binary tarball, pinned to a known-good version.
|
||||
# Bump NVIM_TARGET_VERSION to upgrade. ~/.local/bin/update-neovim.sh does
|
||||
# the same check + download so topgrade can invoke it for upgrades.
|
||||
NVIM_TARGET_VERSION="v0.11.4"
|
||||
ARCH="$(uname -m)"
|
||||
case "$ARCH" in
|
||||
x86_64)
|
||||
NVIM_TARBALL="nvim-linux64.tar.gz"
|
||||
NVIM_EXTRACT_DIR="nvim-linux64"
|
||||
;;
|
||||
aarch64|arm64)
|
||||
NVIM_TARBALL="nvim-linux-arm64.tar.gz"
|
||||
NVIM_EXTRACT_DIR="nvim-linux-arm64"
|
||||
;;
|
||||
*)
|
||||
die "unsupported arch for neovim tarball: $ARCH"
|
||||
;;
|
||||
esac
|
||||
|
||||
if command -v nvim >/dev/null 2>&1; then
|
||||
INSTALLED_VER="$(nvim --version 2>/dev/null | head -1 | awk '{print $2}')"
|
||||
if [[ "$INSTALLED_VER" == "$NVIM_TARGET_VERSION" ]]; then
|
||||
log "neovim $INSTALLED_VER matches target — skipping"
|
||||
NVIM_TARBALL=""
|
||||
else
|
||||
log "neovim $INSTALLED_VER != target $NVIM_TARGET_VERSION — upgrading"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$NVIM_TARBALL" ]]; then
|
||||
log "downloading neovim $NVIM_TARGET_VERSION ($NVIM_TARBALL)"
|
||||
cd /tmp
|
||||
if ! curl -fL --retry 3 \
|
||||
"https://github.com/neovim/neovim/releases/download/${NVIM_TARGET_VERSION}/${NVIM_TARBALL}" \
|
||||
-o nvim.tar.gz; then
|
||||
die "failed to download neovim tarball"
|
||||
fi
|
||||
sudo rm -rf /opt/nvim-linux* /usr/local/bin/nvim
|
||||
sudo tar -xzf nvim.tar.gz -C /opt/
|
||||
sudo ln -sf "/opt/${NVIM_EXTRACT_DIR}/bin/nvim" /usr/local/bin/nvim
|
||||
rm -f nvim.tar.gz
|
||||
fi
|
||||
|
||||
# Verify neovim is reachable (PATH may need /usr/local/bin explicitly for this run)
|
||||
if ! command -v nvim >/dev/null 2>&1 && [[ -x /usr/local/bin/nvim ]]; then
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
fi
|
||||
# Neovim comes from the system package (pacman list above); topgrade keeps
|
||||
# it current. No manual tarball install.
|
||||
|
||||
{{ else -}}
|
||||
die "unsupported os_family: {{ .os_family }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue