From 0d02838949b33f34b6e110dc745b3a9adb773ed8 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Fri, 22 Mar 2024 06:59:42 +0100 Subject: [PATCH] soljson --- apps/remix-ide/ci/downloadsoljson.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide/ci/downloadsoljson.sh b/apps/remix-ide/ci/downloadsoljson.sh index 6fa9979acb..4d3d93932f 100644 --- a/apps/remix-ide/ci/downloadsoljson.sh +++ b/apps/remix-ide/ci/downloadsoljson.sh @@ -10,27 +10,22 @@ if ! command -v curl &> /dev/null; then exit 1 fi -if ! command -v jq &> /dev/null; then - echo "jq could not be found" - exit 1 -fi - # Read the defaultVersion from package.json -defaultVersion=$(jq -r '.defaultVersion' package.json) +defaultVersion=$(grep '"defaultVersion"' package.json | awk -F '"' '{print $4}') echo "Specified version from package.json: $defaultVersion" # Download the list.json file containing available versions curl -s https://binaries.soliditylang.org/wasm/list.json > list.json # Use jq to extract the path for the specified version from the builds array -path=$(jq -r --arg version "$defaultVersion" '.builds[] | select(.path==$version) | .path' list.json) -if [ -z "$path" ]; then +check=$(grep "\"$defaultVersion\"" list.json) +if [ -z "$check" ]; then echo "The specified version $defaultVersion could not be found in the list" exit 1 fi -echo "Path for the specified version: $path" -fullPath="https://binaries.soliditylang.org/bin/$path" +echo "Path for the specified version: $defaultVersion" +fullPath="https://binaries.soliditylang.org/bin/$defaultVersion" echo "Download fullPath: $fullPath" # Ensure the target directory exists