automate/020_onivim.sh

12 lines
429 B
Bash

apt-get install jq
set +x
PROJECT=onivim/oni
RELEASE=$(curl "https://api.github.com/repos/${PROJECT}/releases?per_page=5" | jq -r '.[0] | .tag_name')
VERSION=$(echo "${RELEASE}" | cut -c 2- | cut -f1 -d"-")
DOWNLOAD_DIR=/tmp
wget -c --directory-prefix "${DOWNLOAD_DIR}" https://github.com/onivim/oni/releases/download/"${RELEASE}"/Oni-"${VERSION}"-amd64-linux.deb
sudo dpkg -i "${DOWNLOAD_DIR}/Oni-${VERSION}-amd64-linux.deb"