setup.sh 947 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env bash
  2. set -e
  3. # If OS is supported will install build tools for rust and substrate.
  4. # Skips installing substrate itself and subkey
  5. curl https://getsubstrate.io -sSf | bash -s -- --fast
  6. source ~/.cargo/env
  7. rustup component add rustfmt clippy
  8. # Current version of substrate requires an older version of nightly toolchain
  9. # to successfully compile the WASM runtime. We force install because rustfmt package
  10. # is not available for this nightly version.
  11. rustup install nightly-2020-05-23 --force
  12. rustup target add wasm32-unknown-unknown --toolchain nightly-2020-05-23
  13. # Sticking with older version of compiler to ensure working build
  14. rustup install 1.46.0
  15. rustup default 1.46.0
  16. if [[ "$OSTYPE" == "linux-gnu" ]]; then
  17. apt-get install coreutils
  18. elif [[ "$OSTYPE" == "darwin"* ]]; then
  19. brew install b2sum gnu-tar
  20. fi
  21. # Volta nodejs, npm, yarn tools manager
  22. curl https://get.volta.sh | bash
  23. volta install node
  24. volta install yarn