-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup-mac.sh
executable file
·111 lines (95 loc) · 2.68 KB
/
setup-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
#!/bin/sh
echo "Setting Mac..."
if test ! $(which brew); then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
eval "$(/usr/local/Homebrew/bin/brew shellenv)"
fi
# Taps
brew tap buo/cask-upgrade
brew tap nektos/tap
brew tap shivammathur/php
brew tap stripe/stripe-cli
brew tap symfony-cli/tap
# Update
brew update
# Binaries
brew install \
act \
dnsmasq \
fastfetch \
git \
mas \
pkg-config \
stripe \
symfony-cli
# Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# Development
brew install \
php \
php@8.2 \
php@8.1 \
shivammathur/php/php@8.0 \
shivammathur/php/php@7.4 \
shivammathur/php/php@7.3 \
shivammathur/php/php@7.2 \
composer \
httpd \
imagemagick \
mariadb \
node \
nginx
# NPM dependencies
npm install -g npm-check-updates
# MySQL configuration
brew services start mariadb
sudo mysql -u root -e "SET PASSWORD = PASSWORD('');"
# PHP modules
$HOMEBREW_PREFIX/opt/php/bin/pecl install apcu imagick redis xdebug
$HOMEBREW_PREFIX/opt/php@8.2/bin/pecl install apcu imagick redis xdebug
$HOMEBREW_PREFIX/opt/php@8.1/bin/pecl install apcu imagick redis xdebug
$HOMEBREW_PREFIX/opt/php@8.0/bin/pecl install apcu imagick redis xdebug
$HOMEBREW_PREFIX/opt/php@7.4/bin/pecl install apcu imagick redis xdebug
$HOMEBREW_PREFIX/opt/php@7.3/bin/pecl install apcu imagick redis xdebug
$HOMEBREW_PREFIX/opt/php@7.2/bin/pecl install apcu imagick redis xdebug
for Php in '7.2' '7.3' '7.4' '8.0' '8.1' '8.2' '8.3'; do
for Module in 'apcu' 'imagick' 'redis'; do
cat > $HOMEBREW_PREFIX/etc/php/"$Php"/conf.d/ext-"$Module".ini << EOF
[$Module]
extension="$Module.so"
EOF
done
cat > $HOMEBREW_PREFIX/etc/php/"$Php"/conf.d/ext-xdebug.ini << EOF
[xdebug]
;zend_extension="xdebug.so"
EOF
done
# PHP Dependencies
composer global require laravel/installer
# Apps
brew install --cask \
cyberduck \
discord \
docker \
firefox \
google-chrome \
google-drive \
httpie \
iterm2 \
keepassx \
meld \
microsoft-office \
spotify \
tableplus \
transmission \
vagrant \
virtualbox \
visual-studio-code \
vlc
# Dotfiles
ln -s $HOME/.dotfiles/config/git/.gitconfig $HOME/.gitconfig
ln -s $HOME/.dotfiles/config/git/.gitignore_global $HOME/.gitignore_global
ln -s $HOME/.dotfiles/config/zsh/aliases.zsh $HOME/.oh-my-zsh/custom/aliases.zsh
ln -s $HOME/.dotfiles/config/zsh/path.zsh $HOME/.oh-my-zsh/custom/path.zsh
ln -s $HOME/.dotfiles/config/.wezterm.lua $HOME/.wezterm.lua
ln -s $HOME/.dotfiles/config/nvim $HOME/.config/nvim