#!/bin/sh set -e yum install -y gcc echo "Init Rust..." echo export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static>>/etc/profile echo export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup>>/etc/profile echo export CARGO_HTTP_MULTIPLEXING=false>>/etc/profile source /etc/profile curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh tee $HOME/.cargo/config <<-'EOF' [source.crates-io] registry = "https://github.com/rust-lang/crates.io-index" replace-with = 'ustc' [source.ustc] registry = "git://mirrors.ustc.edu.cn/crates.io-index" #registry = "https://mirrors.ustc.edu.cn/crates.io-index" EOF source $HOME/.cargo/env rustup -V rustup toolchain install nightly rustup -V