github.com/diadata-org/diadata@v1.4.593/scripts/jsonLintConfigs.sh (about) 1 checkBinary() { 2 which $1 3 if [ $? -ne 0 ] 4 then 5 echo missing $1 6 exit 7 fi 8 9 10 } 11 FILE="$1" 12 if [ ! -f $FILE ] 13 then 14 echo "File $FILE does not exist"; exit 15 fi 16 checkBinary jq 17 checkBinary jsonlint-py 18 19 jsonlint-py -f $FILE | jq '.Coins|=sort_by(.Symbol)|.Coins|=sort_by(.ForeignName)' > /tmp/$$.txt 20 cp /tmp/$$.txt $FILE