ubuntu_install_rust.sh 605 Bytes
Newer Older
1 2 3 4 5 6 7
#!/bin/bash

set -e
set -u
set -o pipefail

apt-get update && apt-get install -y --no-install-recommends curl
8

9 10
export RUSTUP_HOME=/opt/rust
export CARGO_HOME=/opt/rust
11
# this rustc is one supported by the installed version of rust-sgx-sdk
12
curl -s -S -L https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain nightly-2019-01-28
13
. $CARGO_HOME/env
14
rustup toolchain add nightly
15
rustup component add rust-src
16
cargo +nightly install sccache
Nick Hynes committed
17
cargo +nightly install rustfmt-nightly --version 1.0.1 --force
18
cargo +nightly install xargo
19 20

# make rust usable by all users
21
chmod -R a+w /opt/rust