From 94e010300e522eb2782331326f2a87be52be893e Mon Sep 17 00:00:00 2001 From: Ashwin Prasad Date: Thu, 5 Apr 2018 01:35:37 +0530 Subject: [PATCH] fix jq test --- scrape.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scrape.sh b/scrape.sh index 64d2cce..b172e82 100755 --- a/scrape.sh +++ b/scrape.sh @@ -15,6 +15,11 @@ if [ $# -eq 0 ] || [ $1 == '-h' ]; then exit 0 fi +if ! [ -x "$(command jq --version)" ]; then + echo 'Error: jq is not installed.' >&2 + exit 1 +fi + function scrape() { echo "Searching pastebin..." curl -s -X GET "$url" | python -m json.tool > ./output/$dir/output.json