install dependencies before anything else

This commit is contained in:
Earl Warren 2023-04-05 23:18:02 +02:00
parent 5d8a0e54b5
commit 60af48d02b
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -49,10 +49,6 @@ function api() {
shift shift
token=$1 token=$1
if ! which jq curl > /dev/null ; then
apt-get -qq install -y jq curl
fi
curl --fail -X $method -sS -H "Content-Type: application/json" -H "Authorization: token $token" "$@" $url/api/v1/$path curl --fail -X $method -sS -H "Content-Type: application/json" -H "Authorization: token $token" "$@" $url/api/v1/$path
} }
@ -159,4 +155,12 @@ function push_self_action() {
) )
} }
function dependencies() {
if ! which jq curl > /dev/null ; then
apt-get -qq install -y jq curl
fi
}
dependencies
"$@" "$@"