dotfiles/recipes/rust

23 lines
440 B
Text
Raw Normal View History

2019-08-29 18:44:34 +00:00
#!/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
}