github.com/whyrusleeping/gx@v0.14.3/tests/scripts/install-jq.sh (about) 1 #!/bin/bash 2 3 OUTPUT=$1 4 5 if type -f jq; then 6 exit 0 7 fi 8 9 case `uname` in 10 Linux) 11 wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 -O "$OUTPUT/jq" 12 ;; 13 Darwin) 14 wget https://github.com/stedolan/jq/releases/download/jq-1.5/jq-osx-amd64 -O "$OUTPUT/jq" 15 ;; 16 *) 17 echo "unsupported system!" 18 exit 1 19 ;; 20 esac 21 22 chmod +x "$OUTPUT/jq"