forked from cowboy/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
30_osx_homebrew_casks.sh
109 lines (102 loc) · 2.02 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# 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 kegs are installed.
kegs=(
caskroom/cask
caskroom/drivers
caskroom/fonts
)
brew_tap_kegs
# Hack to show the first-run brew-cask password prompt immediately.
brew cask info this-is-somewhat-annoying 2>/dev/null
# Homebrew casks
casks=(
# Applications
a-better-finder-rename
android-platform-tools
# battle-net
bettertouchtool
charles
chromium
# chronosync
controllermate
docker
# dropbox
fastscripts
firefox
gyazo
hex-fiend
iterm2
karabiner-elements
launchbar
macvim
messenger-for-desktop
midi-monitor
# moom
# omnidisksweeper
# race-for-the-galaxy
# reaper
robo-3t
# screenhero
# scroll-reverser
# skype
# slack
sourcetree
# spotify
# steam
the-unarchiver
totalfinder
tower
vagrant
virtualbox
vlc
ynab
yujitach-menumeters
# Quick Look plugins
betterzipql
qlcolorcode
qlmarkdown
qlprettypatch
qlstephen
quicklook-csv
quicklook-json
quicknfo
suspicious-package
webpquicklook
# Color pickers
colorpicker-developer
colorpicker-skalacolor
# Drivers
sonos
xbox360-controller-driver
# Fonts
font-m-plus
font-mplus-nerd-font
font-mplus-nerd-font-mono
)
# 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
# Work around colorPicker symlink issue.
# https://github.com/caskroom/homebrew-cask/issues/7004
cps=()
for f in ~/Library/ColorPickers/*.colorPicker; do
[[ -L "$f" ]] && cps=("${cps[@]}" "$f")
done
if (( ${#cps[@]} > 0 )); then
e_header "Fixing colorPicker symlinks"
for f in "${cps[@]}"; do
target="$(readlink "$f")"
e_arrow "$(basename "$f")"
rm "$f"
cp -R "$target" ~/Library/ColorPickers/
done
fi