Download and extract latest nvim release

This commit is contained in:
Ranomier 2021-04-28 12:38:08 +02:00
commit 3166829e4f

24
update.sh Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
#set -eu -o pipefail
URLS="$(\
curl -s https://api.github.com/repos/neovim/neovim/releases/latest |
grep -o 'https://.*linux64\.tar\.gz')\n"
FILENAMES="$(printf "$URLS" | xargs basename)"
printf ">> Found the following files:\n"
printf "$URLS"
printf "\n"
printf ">> Downloading files:\n"
printf "$URLS" | xargs curl -LJO --progress-bar
printf "\n"
printf ">> Extracting files... "
printf "$FILENAMES" | xargs tar -xf
printf "done\n\n"
printf ">> Removing files:\n"
printf "$FILENAMES" | xargs rm -v