2 # Set up the appropriate rustc toolchain
8 RTIM_PATH=$(command -v rustup-toolchain-install-master)
9 CARGO_HOME=${CARGO_HOME:-$HOME/.cargo}
11 # Check if people also install RTIM in other locations beside
13 if [[ "$RTIM_PATH" == $CARGO_HOME/bin/rustup-toolchain-install-master ]]; then
14 cargo +nightly install rustup-toolchain-install-master
16 VERSION=$(rustup-toolchain-install-master -V | grep -o "[0-9.]*")
17 REMOTE=$(cargo search rustup-toolchain-install-master | grep -o "[0-9.]*")
18 echo "info: skipping updating rustup-toolchain-install-master at $RTIM_PATH"
19 echo " current version : $VERSION"
20 echo " remote version : $REMOTE"
23 RUST_COMMIT=$(git ls-remote https://github.com/rust-lang/rust master | awk '{print $1}')
25 if rustc +master -Vv 2>/dev/null | grep -q "$RUST_COMMIT"; then
26 echo "info: master toolchain is up-to-date"
30 rustup-toolchain-install-master -f -n master -c rustc-dev -- "$RUST_COMMIT"
31 rustup override set master