-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-rustup.bash
executable file
·65 lines (61 loc) · 2.23 KB
/
setup-rustup.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
set -euE -o pipefail
if [ "$TERM" = dumb ]; then
yellow=''
bold=''
ansi_reset=''
else
yellow=`echo -e '\e[33m'`
bold=`echo -e '\e[1m'`
ansi_reset=`echo -e '\e[m'`
fi
if [ "`whoami`" = root ]; then
echo "${yellow}Don't run this script as root.${ansi_reset}"
exit 1
fi
if [ -f ~/.cargo/bin/racer ]; then
echo "${bold}rustup and Rust tools are already installed.${ansi_reset}"
else
echo "${bold}Installing rustup and Rust tools...${ansi_reset}"
wget https://sh.rustup.rs -O /tmp/rustup-init
sh /tmp/rustup-init -y --no-modify-path --default-toolchain stable
~/.cargo/bin/rustup install 1.15.1 1.38.0 nightly
~/.cargo/bin/rustup component add rust-src rust-analysis rls clippy rustfmt --toolchain stable
# ~/.cargo/bin/rustup component add clippy rustfmt --toolchain nightly
~/.cargo/bin/cargo +stable install \
bandwhich \
cargo-asm \
cargo-audit \
cargo-bloat \
cargo-clone \
cargo-count \
cargo-crev \
cargo-deny \
cargo-deps \
cargo-edit \
cargo-feature \
cargo-generate \
cargo-license \
cargo-make \
cargo-outdated \
cargo-profiler \
cargo-script \
cargo-tree\
cargo-update \
cross \
diesel_cli \
du-dust \
exa \
fselect \
lsd \
mdbook \
onefetch \
starship \
tokei
~/.cargo/bin/cargo +stable install --git https://github.com/rust-analyzer/rust-analyzer ra_lsp_server
~/.cargo/bin/cargo +stable install --git https://github.com/google/pix-image-viewer
# ~/.cargo/bin/cargo +stable install cargo-local-registry
# ~/.cargo/bin/cargo +nightly install cargo-modules
~/.cargo/bin/cargo +nightly install racer papyrus
RUSTFLAGS="--cfg procmacro2_semver_exempt" ~/.cargo/bin/cargo +nightly install cargo-tarpaulin
fi