]> git.lizzy.rs Git - rust.git/blob - rustup.sh
Implement f*_fast intrinsics
[rust.git] / rustup.sh
1 #!/bin/bash
2
3 set -e
4
5 case $1 in
6     "prepare")
7         TOOLCHAIN=$(date +%Y-%m-%d)
8
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
12
13         echo "=> Uninstalling all old nighlies"
14         for nightly in $(rustup toolchain list | grep nightly | grep -v $TOOLCHAIN | grep -v nightly-x86_64); do
15             rustup toolchain uninstall $nightly
16         done
17
18         ./clean_all.sh
19         ./prepare.sh
20
21         (cd build_sysroot && cargo update)
22
23         ;;
24     "commit")
25         git add rust-toolchain build_sysroot/Cargo.lock
26         git commit -m "Rustup to $(rustc -V)"
27         ;;
28     *)
29         echo "Unknown command '$1'"
30         echo "Usage: ./rustup.sh prepare|commit"
31         ;;
32 esac