pull/5370/head
filip mertens 2 years ago
parent bb10f73084
commit dca07d4ad1
  1. 15
      apps/remix-ide/ci/downloadsoljson.sh

@ -8,13 +8,26 @@ then
exit exit
fi fi
# install jq if not installed
if ! command -v jq &> /dev/null
then
echo "jq could not be found"
echo "installing jq"
sudo apt-get install jq
fi
if ! command -v jq &> /dev/null
then
echo "jq could not be found"
exit
fi
# download https://binaries.soliditylang.org/wasm/list.json as json # download https://binaries.soliditylang.org/wasm/list.json as json
curl https://binaries.soliditylang.org/wasm/list.json > list.json curl https://binaries.soliditylang.org/wasm/list.json > list.json
# get the latest version # get the latest version
version=$(cat list.json | jq -r '.latestRelease') version=$(cat list.json | jq -r '.latestRelease')
echo $version echo $version
# the value of releases with key $version # the value of releases with key $version
url=$(cat list.json | npx jq -r '.releases[]' | grep "$version+") url=$(cat list.json | jq -r '.releases[]' | grep "$version+")
echo $url echo $url
# set path to the url # set path to the url
path="https://binaries.soliditylang.org/bin/$url" path="https://binaries.soliditylang.org/bin/$url"

Loading…
Cancel
Save