From: Tiago Melo Date: Thu, 13 Aug 2020 15:38:37 +0000 (+0000) Subject: script/ceph-backport.sh: Check if jq is installed X-Git-Tag: v16.1.0~1426^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F36618%2Fhead;p=ceph.git script/ceph-backport.sh: Check if jq is installed If you tried to setup ceph-backport.sh without having 'jq' installed, you would get a totally unrelated error message and it was hard to figure out the problem. Signed-off-by: Tiago Melo --- diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh index 5bfa7cb1f628..5a9882baa33e 100755 --- a/src/script/ceph-backport.sh +++ b/src/script/ceph-backport.sh @@ -1401,6 +1401,18 @@ else fi +# +# is jq available? +# + +if command -v jq >/dev/null ; then + debug "jq is available. Good." +else + error "This script needs \"jq\" in order to work, and it is not available" + abort_due_to_setup_problem +fi + + # # process command-line arguments #