Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Add Solidity compiler to solana installer
Browse files Browse the repository at this point in the history
  • Loading branch information
seanyoung committed Apr 13, 2023
1 parent fdecd0d commit 2ad54f5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions scripts/cargo-install-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,37 @@ 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
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
curl $curlopt -o "$installDir/bin/solang" $base/$version/solang-mac-$arch
chmod 755 "$installDir/bin/solang"
;;
*)
curl $curlopt -o "$installDir/bin/solang.exe" $base/$version/solang.exe
;;
esac
fi

(
set -x
# deps dir can be empty
Expand Down

0 comments on commit 2ad54f5

Please sign in to comment.