mirror of
https://github.com/correl/dotfiles.git
synced 2024-12-18 11:06:17 +00:00
22 lines
440 B
Bash
22 lines
440 B
Bash
#!/bin/bash
|
|
# Description: The Rust programming language
|
|
set -e
|
|
|
|
case $_PLATFORM in
|
|
darwin)
|
|
_recipe brew
|
|
_recipe _path
|
|
|
|
_brew rust
|
|
_path "$HOME/.cargo/bin"
|
|
;;
|
|
esac
|
|
|
|
function _cargo {
|
|
local pkg=$1
|
|
if ! cargo install --list | grep "^$pkg " >/dev/null; then
|
|
_run "[cargo] Install $pkg" cargo install $pkg
|
|
else
|
|
echo "[cargo] $pkg is already installed, skipping."
|
|
fi
|
|
}
|