-
Notifications
You must be signed in to change notification settings - Fork 5
/
mac.sh
150 lines (123 loc) · 3.44 KB
/
mac.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
144
145
146
147
148
149
150
#!/bin/bash
#
# macOS Setup
#
# Ainsley Clark, ainsley.dev - 15/01/2022
# Variables
PHP_VERSION="7.4"
GOLANG_VERSION="1.19"
echo "************************************************"
echo "*** Welcome to the macOS System Setup ***"
echo "************************************************"
echo ""
# Git Variables
echo "What name do you want to use in git user.name?"
read git_config_user_name
echo "What email do you want to use in git user.email?"
read git_config_user_email
# Copy dot files
cp ./editorconfig ~/.editorconfig
# Install brew if not already
if ! hash brew
then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
printf "\e[93m%s\e[m\n" "You already have brew installed, updating"
fi
# Update brew
brew update
# Curl / Wget
echo "Installing curl & wget"
brew install curl
brew install wget
# Git
echo "Installing git"
brew install git
echo "Setting up your git global user name and email"
git config --global user.name "$git_config_user_name"
git config --global user.email $git_config_user_email
echo "Copying global .gitignore file"
sudo cp ./git/.gitignore ~/.gitignore
git config --global core.excludesfile ~/.gitignore
# Browser
echo "Installing browsers"
brew install --cask google-chrome
brew install --cask firefox
brew install --cask microsoft-edge
# Terminal replacement https://www.iterm2.com
echo "Installing iterm2"
brew install --cask iterm2
# Go
echo "Installing GoLang $GOLANG_VERSION"
brew install go@$GOLANG_VERSION
# Node/NPM/Typescript
echo "Installing node"
brew install node
sudo npm install -g typescript
# PHP
echo "Installing PHP $PHP_VERSION"
brew install php@$PHP_VERSION
# Python
echo "Installing python"
brew install python
# MySQL
echo "Installing NySQL and MySQL client"
brew install mysql
brew install mysql-client
# IDEs
echo "Installing IDEs"
brew install --cask visual-studio-code
brew install --cask goland
brew install --cask phpstorm
brew install --cask datagrip
brew install --cask webstorm
# Communication
echo "Installing communication apps"
brew install --cask slack
brew install --cask whatsapp
brew install --cask zoom
# Dev tools
echo "Installing dev tools"
brew install bash
brew install zsh
brew install kubectl
brew install goreleaser
brew install hugo
brew install golangci-lint
brew install --cask postman
brew install mockery
# Productivity
echo "Installing productivity apps"
brew install --cask simplenote
brew install --cask adobe-creative-cloud
# Music / Video
echo "Installing music and video apps"
brew install --cask spotify
brew install --cask vlc
brew install --cask plex
# Misc
echo "Installing misc"
brew install --cask transmission
brew install --cask carbon-copy-cloner
brew install --cask geekbench
brew install --cask handbrake
brew install shpotify
brew install neofetch
# Image / Video Optimisation
echo "Installing image and video optimisation CLI's"
brew install webp
brew install optipng
brew install jpegoptim
brew install libavif
brew install ffmpeg
# Inject Envs
echo 'export PATH="/usr/local/opt/php@$PHP_VERSION/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/php@$PHP_VERSION/sbin:$PATH"' >> ~/.zshrc
# Oh My ZSH (Last)
echo "Installing Oh My ZSH"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
zsh
echo ""
echo "************************************************"
echo "*** Finished, now run ./post-install ***"
echo "************************************************"