forked from cowboy/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path30_osx_homebrew_recipes.sh
143 lines (135 loc) · 2.25 KB
/
30_osx_homebrew_recipes.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# OSX-only stuff. Abort if not OSX.
is_osx || return 1
# Exit if Homebrew is not installed.
[[ ! "$(type -P brew)" ]] && e_error "Brew recipes need Homebrew to install." && return 1
kegs=(
liamg/tfsec
hashicorp/tap
)
brew_tap_kegs
# Homebrew recipes
recipes=(
ansible
#ant
#apr
#apr-util
#autoconf
#automake
awscli
bash
#boost
#cairo
cmatrix
consul
consul-template
cowsay
imagemagick
#czmq
#dnsmasq
docker
docker-compose
#docker-machine
#dvm
#eot-utils
ffmpeg
fontconfig
fontforge
freetype
#gd
#gdbm
#gettext
git
git-extras
glib
go
gobject-introspection
gradle
gpg2
rbenv/tap/[email protected]
#graphviz
#harfbuzz
#highlight
#hub
#icu4c
#id3tool
jpeg
jq
#lame
lesspipe
libevent
libffi
libpng
libsodium
libtiff
libtool
libvo-aacenc
libxml2
libyaml
#liquibase
#lua
#man2html
maven
mysql
#nmap
#oniguruma
openssl
#p7zip
#pango
#pcre
#php56
#php56-opcache
#pixman
#pkg-config
#pstree
python
readline
reattach-to-user-namespace
#sl
#sqlite
ssh-copy-id
terminal-notifier
tfenv
#the_silver_searcher
tmux
tree
unar
unixodbc
wget
x264
xvid
xz
#youtube-dl
#zeromq
zlib
vault
envconsul
packer
jenv
pre-commit
gawk
terraform-docs
tflint
tfsec
coreutils
hashicorp/tap/waypoint
)
brew_install_recipes
# Misc cleanup!
# This is where brew stores its binary symlinks
local binroot="$(brew --config | awk '/HOMEBREW_PREFIX/ {print $2}')"/bin
# htop
if [[ "$(type -P $binroot/htop)" ]] && [[ "$(stat -L -f "%Su:%Sg" "$binroot/htop")" != "root:wheel" || ! "$(($(stat -L -f "%DMp" "$binroot/htop") & 4))" ]]; then
e_header "Updating htop permissions"
sudo chown root:wheel "$binroot/htop"
sudo chmod u+s "$binroot/htop"
fi
# bash
if [[ "$(type -P $binroot/bash)" && "$(cat /etc/shells | grep -q "$binroot/bash")" ]]; then
e_header "Adding $binroot/bash to the list of acceptable shells"
echo "$binroot/bash" | sudo tee -a /etc/shells >/dev/null
fi
if [[ "$(dscl . -read ~ UserShell | awk '{print $2}')" != "$binroot/bash" ]]; then
e_header "Making $binroot/bash your default shell"
sudo chsh -s "$binroot/bash" "$USER" >/dev/null 2>&1
e_arrow "Please exit and restart all your shells."
fi