Created
September 15, 2022 00:48
-
-
Save hskang9/c038adae21b50596474ff04bd110fad9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Cargo contract | |
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | |
# Arch Linux | |
if [ -f "/etc/arch-release" ]; then | |
pacman -S binaryen | |
cargo install cargo-dylint dylint-link | |
cargo install --force --locked cargo-contract | |
# Debian/Ubuntu | |
elif [ -f "/etc/debian_version" ]; then | |
apt-get install -y binaryen | |
cargo install cargo-dylint dylint-link | |
cargo install --force --locked cargo-contract | |
else | |
echo "Unsupported Linux distribution" | |
exit 1 | |
fi | |
elif [[ "$OSTYPE" == "darwin"* ]]; then | |
# Mac OSX | |
brew install binaryen | |
brew install openssl | |
cargo install cargo-dylint dylint-link | |
cargo install --force --locked cargo-contract | |
elif [[ "$OSTYPE" == "msys" ]]; then | |
# Lightweight shell and GNU utilities compiled for Windows (part of MinGW) | |
echo "Windows is not supported yet, please install cargo-contract manually in the meantime at https://github.com/paritytech/cargo-contract" | |
elif [[ "$OSTYPE" == "win32" ]]; then | |
echo "Windows is not supported yet, please install cargo-contract manually in the meantime at https://github.com/paritytech/cargo-contract" | |
else | |
# Unknown. | |
echo "Installer cannot detect your OS, please install cargo-contract manually in the meantime at https://github.com/paritytech/cargo-contract" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment