-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
72 lines (56 loc) · 1.89 KB
/
install.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
# Hide "last login" line when starting a new terminal session
touch $HOME/.hushlogin
# ask password beforehand
sudo -v
# Symlink the Mackup config
ln -s $HOME/.dotfile/macos/.mackup.cfg $HOME/.mackup.cfg
# Add global gitignore
ln -s $HOME/.dotfile/shell/.global-gitignore $HOME/.global-gitignore
git config --global core.excludesfile $HOME/.global-gitignore
# Symlink zsh prefs
rm $HOME/.zshrc
ln -s $HOME/.dotfile/shell/.zshrc $HOME/.zshrc
echo 'Install homebrew'
echo '----------------'
echo install homebrew
sudo rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/sebastian/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
echo 'Install php'
echo '-----------'
brew tap shivammathur/php
brew install shivammathur/php/[email protected]
brew link --overwrite --force [email protected]
echo 'Install composer'
echo '----------------'
EXPECTED_COMPOSER_CHECKSUM="$(curl https://composer.github.io/installer.sig)"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_COMPOSER_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_COMPOSER_CHECKSUM" != "$ACTUAL_COMPOSER_CHECKSUM" ]
then
>&2 echo 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi
php composer-setup.php
rm composer-setup.php
sudo mkdir /usr/local/bin/
sudo mv composer.phar /usr/local/bin/composer
#echo 'Install imagemagick'
#echo '-------------------'
#brew install imagemagick
#echo 'Install imagick'
#echo '---------------'
#pecl install imagick
#echo 'Install xdebug'
#echo '--------------'
#pecl install xdebug
echo 'Install laravel valet'
echo '---------------------'
composer global require laravel/valet
valet install
echo 'Install mackup'
echo '--------------'
brew install mackup
echo "Setting up your Mac"