Add Solidity compiler to solana installer (#31184)
Co-authored-by: mvines <mvines@gmail.com>
This commit is contained in:
parent
7cf50e60fc
commit
1438d9ef08
|
@ -165,6 +165,40 @@ if [[ -z "$validatorOnly" ]]; then
|
|||
cp -a sdk/sbf/* "$installDir"/bin/sdk/sbf
|
||||
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
|
||||
# deps dir can be empty
|
||||
|
|
Loading…
Reference in New Issue