You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
684 B

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. #! /bin/bash
  2. # exit if a command fails
  3. set -e
  4. triple=x86_64-unknown-linux-gnu
  5. # install curl (needed to install rust)
  6. apt-get update && apt-get install -y curl gdb g++-multilib lib32stdc++6 libssl-dev libncurses5-dev
  7. # install rust
  8. curl -sL https://static.rust-lang.org/dist/rust-nightly-$triple.tar.gz | tar xvz -C /tmp
  9. /tmp/rust-nightly-$triple/install.sh
  10. # install cargo
  11. curl -sL https://static.rust-lang.org/cargo-dist/cargo-nightly-$triple.tar.gz | tar xvz -C /tmp
  12. /tmp/cargo-nightly-$triple/install.sh
  13. # cleanup package manager
  14. apt-get remove --purge -y curl && apt-get autoclean && apt-get clean
  15. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  16. # prepare dir
  17. mkdir /source