mirror of
https://github.com/correl/dotfiles.git
synced 2024-11-25 03:00:05 +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
|
|
}
|