From ea686d7c56499339ad176e9f19c516ff6cf05a31 Mon Sep 17 00:00:00 2001 From: Alif Rachmawadi Date: Tue, 19 Jul 2022 12:00:34 +0700 Subject: [PATCH] check jq --- setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 4745766..cfe47fa 100755 --- a/setup.sh +++ b/setup.sh @@ -90,7 +90,11 @@ transform_path() { fi } -if ! command -v jq; then +check_command() { + command -v "$1" > /dev/null 2>&1 +} + +if ! check_command jq; then echo "jq not found, please install it, https://stedolan.github.io/jq/download/" exit 1 fi