wip
This commit is contained in:
parent
61d8adce97
commit
14d188d49e
1 changed files with 12 additions and 4 deletions
|
@ -116,25 +116,33 @@
|
||||||
|
|
||||||
echo_info "Downloading Neovim version $latest_version..."
|
echo_info "Downloading Neovim version $latest_version..."
|
||||||
|
|
||||||
|
# Determine architecture
|
||||||
|
arch=$(uname -m)
|
||||||
|
if [ "$arch" = "aarch64" ] || [ "$arch" = "armv7l" ]; then
|
||||||
|
nvim_tarball="nvim-linux-arm64.tar.gz"
|
||||||
|
else
|
||||||
|
nvim_tarball="nvim-linux-x86_64.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
# Download the tarball
|
# Download the tarball
|
||||||
curl -fsSL -o "$tempdir/nvim.tar.gz" "https://github.com/neovim/neovim/releases/download/${latest_version}/nvim-linux-x86_64.tar.gz"
|
curl -fsSL -o "$tempdir/nvim.tar.gz" "https://github.com/neovim/neovim/releases/download/${latest_version}/${nvim_tarball}"
|
||||||
|
|
||||||
# Change to the temporary directory and extract
|
# Change to the temporary directory and extract
|
||||||
cd "$tempdir"
|
cd "$tempdir"
|
||||||
tar -xzf nvim.tar.gz
|
tar -xzf nvim.tar.gz
|
||||||
|
|
||||||
# Remove old installation if it exists
|
# Remove old installation if it exists
|
||||||
rm -rf "$HOME/.bin/nvim-linux-x86_64"
|
rm -rf "$HOME/.bin/nvim-linux-x86_64" "$HOME/.bin/nvim-linux-arm64"
|
||||||
|
|
||||||
# Copy to destination
|
# Copy to destination
|
||||||
cp -r ./nvim-linux-x86_64 "$HOME/.bin/"
|
cp -r ./nvim-linux-* "$HOME/.bin/"
|
||||||
|
|
||||||
# Create symlinks with absolute paths
|
# Create symlinks with absolute paths
|
||||||
inst_paths="/usr/bin /usr/share/bin $HOME/.local/bin"
|
inst_paths="/usr/bin /usr/share/bin $HOME/.local/bin"
|
||||||
for in_path in $inst_paths; do
|
for in_path in $inst_paths; do
|
||||||
if [ -d "$in_path" ]; then
|
if [ -d "$in_path" ]; then
|
||||||
echo_info "Installing into $in_path"
|
echo_info "Installing into $in_path"
|
||||||
$_sudo ln -sf "$HOME/.bin/nvim-linux-x86_64/bin/nvim" "$in_path/nvim"
|
$_sudo ln -sf "$HOME/.bin/nvim-linux-*/bin/nvim" "$in_path/nvim"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue