From 648caced6eb0d23c31758f69f2f44a7d748526b9 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Fri, 27 Nov 2020 16:52:17 +0100 Subject: Use the new component dependency option of the rust-toolchain file --- scripts/cargo.sh | 2 +- scripts/rustup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cargo.sh b/scripts/cargo.sh index dcd40acc02a..3e47a1cf558 100755 --- a/scripts/cargo.sh +++ b/scripts/cargo.sh @@ -4,7 +4,7 @@ dir=$(dirname "$0") source "$dir/config.sh" # read nightly compiler from rust-toolchain file -TOOLCHAIN=$(cat "$dir/rust-toolchain") +TOOLCHAIN=$(cat "$dir/rust-toolchain" | grep channel | sed "s/channel = \"\(.*\)\"/\1/") cmd=$1 shift || true diff --git a/scripts/rustup.sh b/scripts/rustup.sh index 430f5c469b4..0f22d0d3845 100755 --- a/scripts/rustup.sh +++ b/scripts/rustup.sh @@ -8,7 +8,7 @@ case $1 in echo "=> Installing new nightly" rustup toolchain install --profile minimal "nightly-${TOOLCHAIN}" # Sanity check to see if the nightly exists - echo "nightly-${TOOLCHAIN}" > rust-toolchain + sed -i "s/\"nightly-.*\"/\"nightly-${TOOLCHAIN}\"/" rust-toolchain rustup component add rustfmt || true echo "=> Uninstalling all old nighlies" -- cgit 1.4.1-3-g733a5