about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-11-27 16:52:17 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2020-11-27 17:53:55 +0100
commit648caced6eb0d23c31758f69f2f44a7d748526b9 (patch)
tree43f862211a4e42fa62a53b2a32982446560c09e5 /scripts
parent41047de9e2f810fcf7aa5e0b038d9c3ad2742564 (diff)
downloadrust-648caced6eb0d23c31758f69f2f44a7d748526b9.tar.gz
rust-648caced6eb0d23c31758f69f2f44a7d748526b9.zip
Use the new component dependency option of the rust-toolchain file
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cargo.sh2
-rwxr-xr-xscripts/rustup.sh2
2 files changed, 2 insertions, 2 deletions
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"