|
@@ -165,6 +165,40 @@ if [[ -z "$validatorOnly" ]]; then
|
|
|
cp -a sdk/sbf/* "$installDir"/bin/sdk/sbf
|
|
cp -a sdk/sbf/* "$installDir"/bin/sdk/sbf
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
|
|
+# Add Solidity Compiler
|
|
|
|
|
+if [[ -z "$validatorOnly" ]]; then
|
|
|
|
|
+ base="https://github.com/hyperledger/solang/releases/download"
|
|
|
|
|
+ version="v0.2.3"
|
|
|
|
|
+ curlopt="-sSfL --retry 5 --retry-delay 2 --retry-connrefused"
|
|
|
|
|
+
|
|
|
|
|
+ case $(uname -s) in
|
|
|
|
|
+ "Linux")
|
|
|
|
|
+ if [[ $(uname -m) == "x86_64" ]]; then
|
|
|
|
|
+ arch="x86-64"
|
|
|
|
|
+ else
|
|
|
|
|
+ arch="arm64"
|
|
|
|
|
+ fi
|
|
|
|
|
+ # shellcheck disable=SC2086
|
|
|
|
|
+ curl $curlopt -o "$installDir/bin/solang" $base/$version/solang-linux-$arch
|
|
|
|
|
+ chmod 755 "$installDir/bin/solang"
|
|
|
|
|
+ ;;
|
|
|
|
|
+ "Darwin")
|
|
|
|
|
+ if [[ $(uname -m) == "x86_64" ]]; then
|
|
|
|
|
+ arch="intel"
|
|
|
|
|
+ else
|
|
|
|
|
+ arch="arm"
|
|
|
|
|
+ fi
|
|
|
|
|
+ # shellcheck disable=SC2086
|
|
|
|
|
+ curl $curlopt -o "$installDir/bin/solang" $base/$version/solang-mac-$arch
|
|
|
|
|
+ chmod 755 "$installDir/bin/solang"
|
|
|
|
|
+ ;;
|
|
|
|
|
+ *)
|
|
|
|
|
+ # shellcheck disable=SC2086
|
|
|
|
|
+ curl $curlopt -o "$installDir/bin/solang.exe" $base/$version/solang.exe
|
|
|
|
|
+ ;;
|
|
|
|
|
+ esac
|
|
|
|
|
+fi
|
|
|
|
|
+
|
|
|
(
|
|
(
|
|
|
set -x
|
|
set -x
|
|
|
# deps dir can be empty
|
|
# deps dir can be empty
|