mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 06:25:38 +00:00
rust-analyzer automation
This commit is contained in:
parent
c2b8c29299
commit
76fd99dd2b
@ -30,15 +30,16 @@ download_rust_analyzer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install_cargos() {
|
install_cargos() {
|
||||||
programs=(
|
set -- \
|
||||||
cargo-edit
|
'cargo-edit'
|
||||||
cargo-whatfeatures
|
'cargo-whatfeatures' \
|
||||||
jql
|
'jql' \
|
||||||
toml-cli
|
'toml-cli'
|
||||||
)
|
for program do
|
||||||
for i in "${programs[@]}"; do
|
cargo install "$program"
|
||||||
cargo install "$i"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "cargos ✓"
|
||||||
}
|
}
|
||||||
|
|
||||||
install_rust
|
install_rust
|
||||||
|
19
scripts/update_rust_analyzer
Executable file
19
scripts/update_rust_analyzer
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
update_rust_analyzer() {
|
||||||
|
if ! (which rust-analyzer > /dev/null)
|
||||||
|
then
|
||||||
|
echo "not installed"
|
||||||
|
else
|
||||||
|
echo "removing"
|
||||||
|
rm /usr/local/bin/rust-analyzer
|
||||||
|
fi
|
||||||
|
echo "downloading rust analyzer"
|
||||||
|
rust_analyzer_bin=/usr/local/bin/rust-analyzer
|
||||||
|
curl -s -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-mac -o $rust_analyzer_bin
|
||||||
|
chmod +x $rust_analyzer_bin
|
||||||
|
|
||||||
|
echo "rust-analyzer ✓"
|
||||||
|
}
|
||||||
|
|
||||||
|
update_rust_analyzer
|
Loading…
Reference in New Issue
Block a user