diff --git a/recipes/pastel b/recipes/pastel new file mode 100644 index 0000000..204ef38 --- /dev/null +++ b/recipes/pastel @@ -0,0 +1,6 @@ +#!/bin/bash +# Description: A CLI utility to generate, analyze, convert, and manipulate colors +set -e + +_recipe rust +_cargo pastel diff --git a/recipes/rust b/recipes/rust new file mode 100644 index 0000000..b46ec8e --- /dev/null +++ b/recipes/rust @@ -0,0 +1,22 @@ +#!/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 +}