Convert homebrew and caskroom boostraps to standalone executables

This commit is contained in:
2017-05-05 10:06:09 +01:00
parent a8054d3843
commit 56cbda6184
4 changed files with 115 additions and 105 deletions

43
bin/bootstrap-homebrew Executable file
View File

@@ -0,0 +1,43 @@
#! /usr/bin/env bash
set -e
pkgs=(
ack
"aspell --with-lang-en --with-lang-el --with-lang-sv"
bash
bazaar
git
heroku
htop
kubernetes-cli
mysql
peco
readline
reattach-to-user-namespace
redis
tccutil
the_silver_searcher
tmux
wget
zsh
)
installed=( $(brew list) )
for pkg in "${pkgs[@]}"; do
base=$(echo $pkg | awk '{print $1}')
found=""
for i in ${installed[@]}; do
if [[ "$base" == "$i" ]]; then
found=1
fi
done
if [ -z "$found" ]; then
echo "--> Missing: ${base}"
brew install ${pkg[@]}
else
echo "--> Installed: ${base}"
fi
done