commit fab6b1f9c2037994d75040559aad9eb66bd1bbee parent 795b1919e7b9ecacc8b95e04fa2f99b4b7631234 Author: Frederic Cambus <fcambus@users.sourceforge.net> Date: Mon, 28 Oct 2013 08:40:11 -0700 Merge pull request #23 from sesm/master Give a meaningfull error message if jq is not found Diffstat:
M | ansiweather | | | 9 | +++++++++ |
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/ansiweather b/ansiweather @@ -73,6 +73,15 @@ rain=$(get_config "rain" || echo "\xe2\x98\x94") fog=$(get_config "fog" || echo "\xe2\x96\x92") +###[ Check if jq is installed ]############################################### + +jqpath="`which jq`" +if [ "$jqpath" == "" ] +then + echo -e "\njq binary is not found, please download it from http://stedolan.github.io/jq/ and put it in your PATH" + exit 255 +fi + ###[ Fetch Weather data ]######################################################