-
Notifications
You must be signed in to change notification settings - Fork 1
/
brew.sh
68 lines (60 loc) · 1.05 KB
/
brew.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
#!/usr/bin/env bash
packages=(
composer
fish
ffmpeg
git
php
nvm
rbenv
ruby-build
scrcpy
siege
wget
)
apps=(
1password
alfred
adoptopenjdk8
android-studio
firefox
licecap
gitify
insomnia
google-chrome
slack
spectacle
visual-studio-code
whatsapp
vlc
zwift
)
# Install homebrew
if ! [ -x "$(command -v brew)" ]; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi;
# Install Packages
for p in "${packages[@]}"
do
if ! brew list -1 | grep -q "^${p}\$"; then
brew install $p;
fi
done
# Install Applications
for a in "${apps[@]}"
do
if ! brew cask list -1 | grep -q "^${a}\$"; then
brew cask install $a;
fi
done
# Setup fish shell
if ! grep -q 'fish' /etc/shells; then
echo /usr/local/bin/fish >>/etc/shells; #add to list of shells
fi;
if ! grep 'fish' $SHELL; then
chsh -s /usr/local/bin/fish; #fish default
fi;
# Update composer
composer self-update
# Cleanup
brew cleanup