-
Notifications
You must be signed in to change notification settings - Fork 182
/
installscript
executable file
·186 lines (146 loc) · 5.01 KB
/
installscript
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#!/bin/bash
# Hide "last login" line when starting a new terminal session
touch $HOME/.hushlogin
# Install zsh
echo 'Install oh-my-zsh'
echo '-----------------'
rm -rf $HOME/.oh-my-zsh
curl -L https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
# Add global gitignore
ln -s $HOME/.dotfiles/shell/.global-gitignore $HOME/.global-gitignore
git config --global core.excludesfile $HOME/.global-gitignore
# Symlink zsh prefs
rm $HOME/.zshrc
ln -s $HOME/.dotfiles/shell/.zshrc $HOME/.zshrc
# Symlink vim prefs
rm $HOME/.vimrc
ln -s $HOME/.dotfiles/shell/.vimrc $HOME/.vimrc
rm $HOME/.vim
ln -s $HOME/.dotfiles/shell/.vim $HOME/.vim
# Symlink the Mackup config
ln -s $HOME/.dotfiles/macos/.mackup.cfg $HOME/.mackup.cfg
# Fix missing font characters (see https://github.com/robbyrussell/oh-my-zsh/issues/1906)
cd ~/.oh-my-zsh/themes/
git checkout d6a36b1 agnoster.zsh-theme
# Activate z
cd ~/.dotfiles/shell
chmod +x z.sh
echo 'Configure npm'
echo '-------------'
# Create a directory for global packages and tell npm where to store globally installed packages
mkdir "${HOME}/.npm-packages"
npm config set prefix "${HOME}/.npm-packages"
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)"' >> $HOME/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
echo 'Install node'
echo '------------'
brew install node
echo 'Install pkg-config'
echo '------------------'
brew install pkg-config
echo 'Install wget'
echo '------------'
brew install wget
echo 'Install httpie'
echo '--------------'
brew install httpie
echo 'Install ncdu'
echo '------------'
brew install ncdu
echo 'Install hub'
echo '-----------'
brew install hub
echo 'Install ack'
echo '-----------'
brew install ack
echo 'Install doctl'
echo '-------------'
brew install doctl
echo 'Install git secret'
echo '------------------'
brew install git-secret
echo 'Install some nice quicklook plugins'
echo '-----------------------------------'
brew install --cask qlcolorcode qlstephen qlmarkdown quicklook-json qlprettypatch quicklook-csv betterzip suspicious-package
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 aicommits'
echo '-----------------'
npm install -g aicommits
echo 'Install imagemagick'
echo '-------------------'
brew install imagemagick
echo 'Install imagick'
echo '---------------'
pecl install imagick
echo 'Install memcached'
echo '-----------------'
pecl install memcached
echo 'Install xdebug'
echo '--------------'
pecl install xdebug
echo 'Install redis'
echo '-------------'
pecl install redis
echo 'Install laravel envoy'
echo '---------------------'
composer global require "laravel/envoy=~2.0"
echo 'Install phpunit-watcher'
echo '-----------------------'
composer global require spatie/phpunit-watcher
echo 'Install laravel valet'
echo '---------------------'
composer global require laravel/valet
valet install
echo 'Install mysql'
echo '-------------'
brew install mysql
brew services start mysql
echo 'Install yarn'
echo '------------'
brew install yarn
echo 'Install ghostscript'
echo '-------------------'
brew install ghostscript
echo 'Install mackup'
echo '--------------'
brew install mackup
echo 'Install zsh-autosuggestions'
echo '---------------------------'
brew install zsh-autosuggestions
echo '++++++++++++++++++++++++++++++'
echo '++++++++++++++++++++++++++++++'
echo 'All done!'
echo 'Things to do to make the agnoster terminal theme work:'
echo '1. Install menlo patched font included in ~/.dotfiles/misc https://gist.github.com/qrush/1595572/raw/Menlo-Powerline.otf'
echo '2. Install patched solarized theme included in ~/.dotfiles/misc'
echo '++++++++++++++++++++++++++++++'
echo 'Some optional tidbits'
echo '1. Make sure dropbox is running first. If you have not backed up via Mackup yet, then run `mackup backup` to symlink preferences for a wide collection of apps to your dropbox. If you already had a backup via mackup run `mackup restore` You'\''ll find more info on Mackup here: https://github.com/lra/mackup.'
echo '2. Set some sensible os x defaults by running: $HOME/.dotfiles/macos/set-defaults.sh'
echo '3. Make a .dotfiles-custom/shell/.aliases for your personal commands'
echo '++++++++++++++++++++++++++++++'
echo '++++++++++++++++++++++++++++++'