3 if [ "$1" = '-h' ] ; then
4 echo 'Updates rustc & clippy'
5 echo 'It first checks if clippy would compile at currentl nightly and if so, it updates.'
7 echo '-h: This help message'
8 echo '-f: Skips the check and just updates'
16 export CARGO_INCREMENTAL=0
17 export RUSTFLAGS='-C target-cpu=native'
20 export RUSTUP_HOME=$HOME/.rustup-attempt
21 test -d $RUSTUP_HOME || (rustup toolchain add nightly && rustup default nightly)
23 cargo +nightly install --force clippy
28 [ "$1" = '-f' ] || try_out
31 cargo +nightly install --force clippy