mirror of
https://github.com/correl/dotfiles.git
synced 2024-11-23 19:19:50 +00:00
23 lines
440 B
Text
23 lines
440 B
Text
|
#!/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
|
||
|
}
|