]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - tools/coverity.sh
Merge pull request #15433 from mrc0mmand/test-reintroduce-parallelization
[thirdparty/systemd.git] / tools / coverity.sh
index e32f5b3993b68eabfb53de1d3166a1e06e935a91..5d3b7e2918074d26cf7586a4ae0685b5b6e7c585 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # The official unmodified version of the script can be found at
 # https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh
@@ -42,11 +42,11 @@ if [ "$AUTH_RES" = "Access denied" ]; then
     echo -e "\033[33;1mCoverity Scan API access denied. Check COVERITY_SCAN_PROJECT_NAME and COVERITY_SCAN_TOKEN.\033[0m"
     exit 1
 else
-    AUTH=`echo $AUTH_RES | python -c "import sys, json; print(json.load(sys.stdin)['upload_permitted'])"`
-    if [ "$AUTH" = "True" ]; then
+    AUTH=`echo $AUTH_RES | jq .upload_permitted`
+    if [ "$AUTH" = "true" ]; then
         echo -e "\033[33;1mCoverity Scan analysis authorized per quota.\033[0m"
     else
-        WHEN=`echo $AUTH_RES | python -c "import sys, json; print(json.load(sys.stdin)['next_upload_permitted_at'])"`
+        WHEN=`echo $AUTH_RES | jq .next_upload_permitted_at`
         echo -e "\033[33;1mCoverity Scan analysis NOT authorized until $WHEN.\033[0m"
         exit 1
     fi