Created
January 17, 2022 07:45
-
-
Save antonpegov/364a0968b02a0cac24bd3152865a0f06 to your computer and use it in GitHub Desktop.
Find actual rust build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for i in `seq 0 99`; do | |
| echo " === === === " | |
| RUST_DATE=`date -u -d "-$i days" "+%Y-%m-%d"` | |
| echo "Checking $RUST_DATE..." | |
| TOML=`curl -sf https://static.rust-lang.org/dist/$RUST_DATE/channel-rust-nightly.toml` | |
| if [[ $? -gt 0 ]]; then | |
| echo "Rust $RUST_DATE does not exist" | |
| else | |
| if [[ -n `echo $TOML | grep rls` && -n `echo $TOML | grep fmt` ]]; then | |
| echo "Rust $RUST_DATE has both rls and rustfmt" | |
| echo "Run \"rustup default nightly-$RUST_DATE\" to install it" | |
| break | |
| fi | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment