File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -10,27 +10,22 @@ if ! command -v curl &> /dev/null; then
1010 exit 1
1111fi
1212
13- if ! command -v jq & > /dev/null; then
14- echo " jq could not be found"
15- exit 1
16- fi
17-
1813# Read the defaultVersion from package.json
19- defaultVersion=$( jq -r ' . defaultVersion' package.json)
14+ defaultVersion=$( grep ' " defaultVersion" ' package.json | awk -F ' " ' ' {print $4} ' )
2015echo " Specified version from package.json: $defaultVersion "
2116
2217# Download the list.json file containing available versions
2318curl -s https://binaries.soliditylang.org/wasm/list.json > list.json
2419
2520# Use jq to extract the path for the specified version from the builds array
26- path =$( jq -r --arg version " $defaultVersion " ' .builds[] | select(.path==$version) | .path ' list.json)
27- if [ -z " $path " ]; then
21+ check =$( grep " \" $defaultVersion \" " list.json)
22+ if [ -z " $check " ]; then
2823 echo " The specified version $defaultVersion could not be found in the list"
2924 exit 1
3025fi
3126
32- echo " Path for the specified version: $path "
33- fullPath=" https://binaries.soliditylang.org/bin/$path "
27+ echo " Path for the specified version: $defaultVersion "
28+ fullPath=" https://binaries.soliditylang.org/bin/$defaultVersion "
3429echo " Download fullPath: $fullPath "
3530
3631# Ensure the target directory exists
You can’t perform that action at this time.
0 commit comments