diff --git a/.update-check.sh b/.update-check.sh index 0d9ca13..0d4d037 100755 --- a/.update-check.sh +++ b/.update-check.sh @@ -1,7 +1,18 @@ #!/usr/bin/env bash set -e +set -o pipefail + +for i in curl jq; do + if [[ "$(command -v "${i}")" == "" ]]; then + echo "${i} doesn't appear to be installed." + missing_pkg="true" + fi +done + +if [[ "${missing_pkg}" == "true" ]]; then + exit 1 +fi -# The following packages are needed to function: curl, jq source PKGBUILD api_data="$(curl -sH "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/drone/drone-cli/releases/latest")"