forked from cowboy/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
30_osx_homebrew_casks.sh
58 lines (52 loc) · 1.17 KB
/
30_osx_homebrew_casks.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# OSX-only stuff. Abort if not OSX.
is_osx || return 1
# Exit if Homebrew is not installed.
[[ ! "$(type -P brew)" ]] && e_error "Brew casks need Homebrew to install." && return 1
# Ensure the cask keg and recipe are installed.
kegs=(
caskroom/cask
caskroom/versions
)
brew_tap_kegs
recipes=(brew-cask)
brew_install_recipes
# Exit if, for some reason, cask is not installed.
[[ ! "$(brew ls --versions brew-cask)" ]] && e_error "Brew-cask failed to install." && return 1
# Hack to show the first-run brew-cask password prompt immediately.
brew cask info this-is-somewhat-annoying 2>/dev/null
# Homebrew casks
casks=(
adobe-creative-cloud
atom
coda
codekit
expandrive
firefox
flash
github
google-chrome
google-chrome-canary
hipchat
iterm2
handbrake
openemu-experimental
psequel
rdio
sequel-pro
sublime-text3
the-unarchiver
transmission
vagrant
vagrant-manager
virtualbox
vlc
)
# Install Homebrew casks.
casks=($(setdiff "${casks[*]}" "$(brew cask list 2>/dev/null)"))
if (( ${#casks[@]} > 0 )); then
e_header "Installing Homebrew casks: ${casks[*]}"
for cask in "${casks[@]}"; do
brew cask install $cask
done
brew cask cleanup
fi