From 693ca30b28f6aad9a58358b1eb441922cfc85e3b Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Thu, 29 Aug 2019 14:44:34 -0400 Subject: [PATCH] [provisioning] Add rust and pastel --- recipes/pastel | 6 ++++++ recipes/rust | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 recipes/pastel create mode 100644 recipes/rust 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 +}