mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 08:46:39 +00:00
Convert homebrew and caskroom boostraps to standalone executables
This commit is contained in:
133
shell/caskroom.sh → bin/bootstrap-caskroom
Normal file → Executable file
133
shell/caskroom.sh → bin/bootstrap-caskroom
Normal file → Executable file
@@ -1,105 +1,116 @@
|
||||
#
|
||||
# Caskroom related stuff.
|
||||
#
|
||||
#! /usr/bin/env bash
|
||||
set -e
|
||||
|
||||
bootstrap_caskroom() {
|
||||
local pkgs=(
|
||||
pkgs=()
|
||||
|
||||
if [[ " $@ " == " home " ]]; then
|
||||
pkgs+=(
|
||||
adium-beta
|
||||
aerial
|
||||
alfred
|
||||
android-file-transfer
|
||||
appcleaner
|
||||
atom
|
||||
audio-hijack
|
||||
autodmg
|
||||
bartender
|
||||
betterzip
|
||||
bowtie
|
||||
calibre
|
||||
carbon-copy-cloner
|
||||
chicken
|
||||
cloudup
|
||||
daisydisk
|
||||
deluge
|
||||
discord
|
||||
docker-beta
|
||||
dropbox
|
||||
ethereum-wallet
|
||||
filebot
|
||||
gog-galaxy
|
||||
gpgtools
|
||||
hackety-hack
|
||||
handbrake
|
||||
irccloud
|
||||
keybase
|
||||
little-snitch
|
||||
logitech-options
|
||||
makemkv
|
||||
messenger
|
||||
micro-snitch
|
||||
mist
|
||||
omnigraffle
|
||||
openemu
|
||||
parallels-desktop
|
||||
plex-media-player
|
||||
ring
|
||||
screenhero
|
||||
sixtyforce
|
||||
skype
|
||||
spotify
|
||||
synology-assistant
|
||||
teamviewer
|
||||
transmission
|
||||
unetbootin
|
||||
virtualbox
|
||||
virtualc64
|
||||
viscosity
|
||||
vmware-fusion
|
||||
witgui
|
||||
xld
|
||||
yakyak
|
||||
ynab
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ " $@ " == " work " ]]; then
|
||||
pkgs+=(
|
||||
aerial
|
||||
alfred
|
||||
appcleaner
|
||||
atom
|
||||
bartender
|
||||
bbedit
|
||||
betterzip
|
||||
chicken
|
||||
docker
|
||||
firefox
|
||||
fluid
|
||||
flux
|
||||
github-desktop
|
||||
gog-galaxy
|
||||
google-cloud-sdk
|
||||
google-chrome
|
||||
gpgtools
|
||||
hackety-hack
|
||||
handbrake
|
||||
hipchat
|
||||
insomnia
|
||||
irccloud
|
||||
istat-menus
|
||||
istumbler
|
||||
iterm2
|
||||
java
|
||||
karabiner-elements
|
||||
keybase
|
||||
licecap
|
||||
little-snitch
|
||||
logitech-options
|
||||
mailplane
|
||||
makemkv
|
||||
messenger
|
||||
micro-snitch
|
||||
mist
|
||||
medis
|
||||
moom
|
||||
mplayerx
|
||||
omnigraffle
|
||||
openemu
|
||||
parallels-desktop
|
||||
paw
|
||||
plex-media-player
|
||||
postman
|
||||
qlstephen
|
||||
resolutionator
|
||||
ring
|
||||
screenhero
|
||||
sequel-pro
|
||||
sixtyforce
|
||||
skype
|
||||
spotify
|
||||
stay
|
||||
synology-assistant
|
||||
teamviewer
|
||||
transmission
|
||||
ubersicht
|
||||
unetbootin
|
||||
virtualbox
|
||||
virtualc64
|
||||
viscosity
|
||||
visual-studio-code
|
||||
vlc
|
||||
vmware-fusion
|
||||
witgui
|
||||
wmail
|
||||
xld
|
||||
yakyak
|
||||
ynab
|
||||
)
|
||||
fi
|
||||
|
||||
local installed=( $(brew cask list) )
|
||||
installed=( $(brew cask list) )
|
||||
|
||||
for pkg in ${pkgs[@]}; do
|
||||
local base=$(echo $pkg | awk '{print $1}')
|
||||
local found=""
|
||||
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
|
||||
brew cask install "${pkg[@]}"
|
||||
for i in ${installed[@]}; do
|
||||
if [[ "$base" == "$i" ]]; then
|
||||
found=1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if [ -z "$found" ]; then
|
||||
echo "--> Missing: ${base}"
|
||||
brew cask install ${pkg[@]}
|
||||
else
|
||||
echo "--> Installed: ${base}"
|
||||
fi
|
||||
done
|
||||
43
bin/bootstrap-homebrew
Executable file
43
bin/bootstrap-homebrew
Executable 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
|
||||
@@ -25,8 +25,6 @@ fi
|
||||
|
||||
# Package management
|
||||
source "$DOTSHELL/nix.sh"
|
||||
source "$DOTSHELL/homebrew.sh"
|
||||
source "$DOTSHELL/caskroom.sh"
|
||||
|
||||
# Aliases
|
||||
source "$DOTSHELL/aliases.sh"
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
#
|
||||
# Homebrew related stuff.
|
||||
#
|
||||
|
||||
bootstrap_homebrew () {
|
||||
local 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
|
||||
the_silver_searcher
|
||||
tmux
|
||||
wget
|
||||
zsh
|
||||
)
|
||||
|
||||
local installed=( $(brew list) )
|
||||
|
||||
for pkg in ${pkgs[@]}; do
|
||||
local base=$(echo $pkg | awk '{print $1}')
|
||||
local found=""
|
||||
|
||||
for i in ${installed[@]}; do
|
||||
if [[ "$base" == "$i" ]]; then
|
||||
found=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$found" ]; then
|
||||
brew install "${pkg[@]}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user