mirror of
https://github.com/correl/dotfiles.git
synced 2025-04-10 09:11:01 -09:00
[provisioning] Add recipe support for brew cask
This commit is contained in:
parent
68e85b7d14
commit
45855db60d
2 changed files with 10 additions and 1 deletions
|
@ -10,6 +10,15 @@ function _brew {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _brew_cask {
|
||||||
|
local pkg=$1
|
||||||
|
if ! brew cask list $pkg >/dev/null 2>&1; then
|
||||||
|
_run "[brew cask] Install $pkg" brew cask install $@
|
||||||
|
else
|
||||||
|
echo "[brew cask] $pkg is already installed, skipping."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
if ! which brew >/dev/null; then
|
if ! which brew >/dev/null; then
|
||||||
|
|
|
@ -4,7 +4,7 @@ set +e
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
_recipe brew
|
_recipe brew
|
||||||
brew cask install mactex
|
_brew_cask mactex
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
_recipe _apt
|
_recipe _apt
|
Loading…
Add table
Reference in a new issue