Debian Codegraph @

third_party/rust/cubeb-coreaudio/install_rustfmt_clippy.sh

raw
1 # https://github.com/rust-lang/rustup-components-history/blob/master/README.md
2 # https://github.com/rust-lang/rust-clippy/blob/27acea0a1baac6cf3ac6debfdbce04f91e15d772/.travis.yml#L40-L46
3 if ! rustup component add rustfmt; then
4 TARGET=$(rustc -Vv | awk '/host/{print $2}')
5 NIGHTLY=$(curl -s "https://rust-lang.github.io/rustup-components-history/${TARGET}/rustfmt")
6 curl -sSL "https://static.rust-lang.org/dist/${NIGHTLY}/rustfmt-nightly-${TARGET}.tar.xz" | \
7 tar -xJf - --strip-components=3 -C ~/.cargo/bin
8 rm -rf ~/.cargo/bin/doc
9 fi
10
11 if ! rustup component add clippy; then
12 TARGET=$(rustc -Vv | awk '/host/{print $2}')
13 NIGHTLY=$(curl -s "https://rust-lang.github.io/rustup-components-history/${TARGET}/clippy")
14 rustup default nightly-${NIGHTLY}
15 rustup component add rustfmt
16 rustup component add clippy
17 fi