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