]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
script/ceph-backport.sh: Check if jq is installed 36618/head
authorTiago Melo <tmelo@suse.com>
Thu, 13 Aug 2020 15:38:37 +0000 (15:38 +0000)
committerTiago Melo <tmelo@suse.com>
Fri, 14 Aug 2020 09:01:57 +0000 (09:01 +0000)
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 <tmelo@suse.com>
src/script/ceph-backport.sh

index 5bfa7cb1f6281abedf98e8440224bb0802f3b386..5a9882baa33edc03af47db5859903fea903a9f97 100755 (executable)
@@ -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
 #