7 TOOLCHAIN
=$
(date +%Y-
%m-
%d
)
9 echo "=> Installing new nightly"
10 rustup toolchain
install --profile minimal nightly-
${TOOLCHAIN} # Sanity check to see if the nightly exists
11 echo nightly-
${TOOLCHAIN} > rust-toolchain
13 echo "=> Uninstalling all old nightlies"
14 for nightly
in $
(rustup toolchain list |
grep nightly |
grep -v $TOOLCHAIN |
grep -v nightly-x86_64
); do
15 rustup toolchain uninstall
$nightly
22 git add rust-toolchain
23 git commit
-m "Rustup to $(rustc -V)"
26 echo "Unknown command '$1'"
27 echo "Usage: ./rustup.sh prepare|commit"