Make update script fail if pipeline fails; Also added update checks
This commit is contained in:
parent
bdc824c357
commit
ed7beebd44
@ -1,7 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
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
|
source PKGBUILD
|
||||||
|
|
||||||
api_data="$(curl -sH "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/drone/drone-cli/releases/latest")"
|
api_data="$(curl -sH "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/drone/drone-cli/releases/latest")"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user