#!/usr/bin/env bash set +x PROJECT=magkopian/keepassxc-debian 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/${PROJECT}/releases/download/"${RELEASE}"/keepassxc_"${RELEASE}"_amd64_stable_stretch.deb sudo dpkg -i "${DOWNLOAD_DIR}/keepassxc_${RELEASE}_amd64_stable_stretch.deb" sudo apt-get -y -f install