install.sh 432 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. set -euxo pipefail
  3. if [ -n "${TARGET:-}" ]; then
  4. rustup target add $TARGET
  5. fi
  6. if [ -n "${CHECK_BLOBS:-}" ]; then
  7. if [ ! -d gcc/bin ]; then
  8. mkdir -p gcc
  9. curl -L https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2018.12.0-x86_64-linux-ubuntu14.tar.gz | tar --strip-components=1 -C gcc -xz
  10. fi
  11. fi
  12. if [ -n "${RUSTFMT:-}" ]; then
  13. rustup component add rustfmt
  14. fi