File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
cd " $( dirname " $0 " ) "
7
7
8
- if [[ " $CI " == true ]] || ! command -v rustup-toolchain-install-master > /dev/null; then
9
- cargo install -Z install-upgrade rustup-toolchain-install-master --bin rustup-toolchain-install-master
8
+ ERRNO=0
9
+ RTIM_PATH=$( command -v rustup-toolchain-install-master) || ERRNO=$?
10
+ CARGO_HOME=${CARGO_HOME:- $HOME / .cargo}
11
+
12
+ # Check if people also install RTIM in other locations beside
13
+ # ~/.cargo/bin
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
16
+ else
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 "
10
22
fi
11
23
12
24
RUST_COMMIT=$( git ls-remote https://github.com/rust-lang/rust master | awk ' {print $1}' )
You can’t perform that action at this time.
0 commit comments