Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(protocol): make download solc script can run outside the protocol dir #13263

Merged
merged 1 commit into from
Mar 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions packages/protocol/scripts/download_solc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

set -e

mkdir -p bin && cd bin
protocol_dir=$(realpath "$(dirname $0)/..")
solc_bin=${protocol_dir}/bin/solc

if [ -f "solc" ]; then
if [ -f "${solc_bin}" ]; then
exit 0
fi

mkdir -p "$(dirname ${solc_bin})"

VERSION=v0.8.18

if [ "$(uname)" = 'Darwin' ]; then
Expand All @@ -19,6 +22,6 @@ else
exit 1
fi

wget -O solc https://github.com/ethereum/solidity/releases/download/$VERSION/$SOLC_FILE_NAME
wget -O "${solc_bin}" https://github.com/ethereum/solidity/releases/download/$VERSION/$SOLC_FILE_NAME

chmod +x solc
chmod +x "${solc_bin}"