-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate-nvim.sh
More file actions
executable file
·32 lines (28 loc) · 932 Bytes
/
update-nvim.sh
File metadata and controls
executable file
·32 lines (28 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
nvim_nightly_url="https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz"
nvim_nightly_checksum="https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz.sha256sum"
# Check if checksum.txt file exists
if [[ -f "checksum.txt" ]]; then
# Compare the checksums
wget "$nvim_nightly_checksum" -O checksum.new.txt
if ! diff checksum.new.txt checksum.txt; then
echo "Checksum mismatch, redownloading"
mv checksum.new.txt checksum.txt
else
echo "Checksum match, already on the latest version"
rm -f checksum.new.txt
exit 1
fi
else
echo "Checksum not found, downloading now"
wget "$nvim_nightly_checksum" -O checksum.txt
fi
# Download the latest nightly build
if ! wget "$nvim_nightly_url" -O nvim-linux64.tar.gz; then
echo "Error downloading nvim nightly build"
exit 1
fi
# Extract the tar.gz
tar xzvf nvim-linux64.tar.gz
# Clean up
rm -f nvim-linux64.tar.gz