]> git.lizzy.rs Git - rust.git/commitdiff
toolchain -> rustup-toolchain
authorRalf Jung <post@ralfj.de>
Sun, 1 Dec 2019 09:20:16 +0000 (10:20 +0100)
committerRalf Jung <post@ralfj.de>
Sun, 1 Dec 2019 09:20:16 +0000 (10:20 +0100)
CONTRIBUTING.md
rustup-toolchain [new file with mode: 0755]
toolchain [deleted file]

index 9338f0b8dd73e8485952ceeb9e5041b058a808de..c673e107d55d516dacef2c2de543eca09abf9269 100644 (file)
@@ -23,7 +23,7 @@ tested against. Other versions will likely not work. After installing
 [`rustup-toolchain-install-master`], you can run the following command to
 install that exact version of rustc as a toolchain:
 ```
-./toolchain
+./rustup-toolchain
 ```
 
 [`rustup-toolchain-install-master`]: https://github.com/kennytm/rustup-toolchain-install-master
@@ -38,7 +38,7 @@ needed.
 
 To update the `rustc-version` file and install the latest rustc, you can run:
 ```
-./toolchain HEAD
+./rustup-toolchain HEAD
 ```
 
 Now try `./miri test`, and submit a PR once that works again.
diff --git a/rustup-toolchain b/rustup-toolchain
new file mode 100755 (executable)
index 0000000..a981ec7
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -e
+# Manages a rustup toolchain called "miri".
+#
+# All commands set "miri" as the override toolchain for the current directory,
+# and make the `rust-version` file match that toolchain.
+#
+# USAGE:
+#
+# ./rustup-toolchain: Update "miri" toolchain to match `rust-version` (the known-good version for this commit).
+# 
+# ./rustup-toolchain HEAD: Update "miri" toolchain and `rust-version` file to latest rustc HEAD.
+# 
+# ./rustup-toolchain $COMMIT: Update "miri" toolchain and `rust-version` file to match that commit.
+
+# Determine new commit.
+if [[ "$1" == "" ]]; then
+    NEW_COMMIT=$(cat rust-version)
+elif [[ "$1" == "HEAD" ]]; then
+    NEW_COMMIT=$(git ls-remote https://github.com/rust-lang/rust/ HEAD | cut -f 1)
+else
+    NEW_COMMIT="$1"
+fi
+echo "$NEW_COMMIT" > rust-version
+
+# Check if we already are at that commit.
+CUR_COMMIT=$(rustc +miri --version -v | egrep "^commit-hash: " | cut -d " " -f 2)
+if [[ "$CUR_COMMIT" == "$NEW_COMMIT" ]]; then
+    echo "miri toolchain is already at commit $CUR_COMMIT."
+    rustup override set miri
+    exit 0
+fi
+
+# Cleanup.
+cargo +nightly clean # Use nightly cargo as miri toolchain might be broken.
+rustup toolchain uninstall miri
+
+# Install and setup new toolchain.
+rustup-toolchain-install-master -n miri -c rust-src -c rustc-dev -- "$NEW_COMMIT"
+rustup override set miri
diff --git a/toolchain b/toolchain
deleted file mode 100755 (executable)
index 043b2ee..0000000
--- a/toolchain
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-set -e
-# Manages a rustup toolchain called "miri".
-#
-# All commands set "miri" as the override toolchain for the current directory,
-# and make the `rust-version` file match that toolchain.
-#
-# USAGE:
-#
-# ./toolchain: Update "miri" toolchain to match `rust-version` (the known-good version for this commit).
-# 
-# ./toolchain HEAD: Update "miri" toolchain and `rust-version` file to latest rustc HEAD.
-# 
-# ./toolchain $COMMIT: Update "miri" toolchain and `rust-version` file to match that commit.
-
-# Determine new commit.
-if [[ "$1" == "" ]]; then
-    NEW_COMMIT=$(cat rust-version)
-elif [[ "$1" == "HEAD" ]]; then
-    NEW_COMMIT=$(git ls-remote https://github.com/rust-lang/rust/ HEAD | cut -f 1)
-else
-    NEW_COMMIT="$1"
-fi
-echo "$NEW_COMMIT" > rust-version
-
-# Check if we already are at that commit.
-CUR_COMMIT=$(rustc +miri --version -v | egrep "^commit-hash: " | cut -d " " -f 2)
-if [[ "$CUR_COMMIT" == "$NEW_COMMIT" ]]; then
-    echo "miri toolchain is already at commit $CUR_COMMIT."
-    rustup override set miri
-    exit 0
-fi
-
-# Cleanup.
-cargo +nightly clean # Use nightly cargo as miri toolchain might be broken.
-rustup toolchain uninstall miri
-
-# Install and setup new toolchain.
-rustup-toolchain-install-master -n miri -c rust-src -c rustc-dev -- "$NEW_COMMIT"
-rustup override set miri