Skip to content

Commit

Permalink
Auto merge of #4856 - lzutao:rtim-non-installed, r=flip1995
Browse files Browse the repository at this point in the history
build: check if RTIM is not installed

changelog: none
  • Loading branch information
bors committed Nov 29, 2019
2 parents 0403687 + d9af448 commit 059568f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions setup-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ set -e

cd "$(dirname "$0")"

RTIM_PATH=$(command -v rustup-toolchain-install-master)
RTIM_PATH=$(command -v rustup-toolchain-install-master) || INSTALLED=false
CARGO_HOME=${CARGO_HOME:-$HOME/.cargo}

# Check if people also install RTIM in other locations beside
# ~/.cargo/bin
if [[ "$RTIM_PATH" == $CARGO_HOME/bin/rustup-toolchain-install-master ]]; then
# Check if RTIM is not installed or installed in other locations not in ~/.cargo/bin
if [[ "$INSTALLED" == false || "$RTIM_PATH" == $CARGO_HOME/bin/rustup-toolchain-install-master ]]; then
cargo +nightly install rustup-toolchain-install-master
else
VERSION=$(rustup-toolchain-install-master -V | grep -o "[0-9.]*")
Expand Down

0 comments on commit 059568f

Please sign in to comment.