-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.me
executable file
·378 lines (356 loc) · 11.2 KB
/
init.me
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
#!/bin/bash
EXIT=0
funRVM() {
echo -e "*** Installing RVM ***"
sleep 1
\curl -sSL https://get.rvm.io | bash -s stable --ruby
echo -e "*** Installed RVM! ***"
sleep 2
}
funHomebrew() {
echo -e "*** Installing Homebrew ***"
sleep 1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo -e "*** Installed Homebrew! ***"
sleep 2
}
funUntapTap() {
echo -e "*** Untap and tap brew repos ***"
sleep 1
brew untap phinze/cask && brew tap phinze/cask
brew untap caskroom/versions && brew tap caskroom/versions
brew untap casidiablo/custom && brew tap casidiablo/custom
brew untap aws/tap && brew tap aws/tap
brew untap homebrew/cask-drivers && brew tap homebrew/cask-drivers
brew untap heroku/brew && brew tap heroku/brew
sleep 2
}
funBrewPackages() {
echo -e "*** Installing Brew Packages ***"
sleep 1
funUntapTap
#brew install ant
#brew install annie # for downloading from youtube, bilibili, etc
brew install autoconf
brew install automake
brew install aws-sam-cli
brew install brew-cask
brew install cabextract
#brew install closure-linter
brew install coreutils
# brew install docker docker-machine
brew install ffmpeg
brew install freetype
brew install fzf
brew install gdbm
brew install geoip
brew install gettext
brew install ghostscript
brew install git
brew install git-lfs
brew install glib
brew install gmp
brew install gnutls
#brew install gradle
brew install grep
#brew install heroku
brew install heroku-toolbelt
brew install htop
brew install hub
brew install imagemagick
brew install jpeg
brew install jq
#brew install keybase
brew install lame
brew install libffi
brew install libgcrypt
brew install libtasn1
#brew install mongo
brew install nettle
brew install nmap
brew install openssl
brew install optipng
brew install pcre
brew install perl
#brew install phantomjs
brew install protobuf
brew install pyenv
brew install python
#brew install rclone # tool to rsync between cloud services
brew install ssh-copy-id
brew install telnet
#brew install tiny-fugue
brew install tor
brew install torsocks
brew install tree
brew install vim
brew install wget
brew install xz
brew install yarn
brew cleanup # clean cache
echo -e "*** Installed Brew Packages! ***"
sleep 2
}
funCaskPackages() {
echo -e "*** Installing Cask Packages ***"
sleep 1
brew cask install android-file-transfer # to browse files of android device
brew cask install android-platform-tools # adb and other stuff
#brew cask install android-studio # Android IDE
brew cask install arduino # IDE to build arduino projects
#brew cask install atom # IDE
brew cask install bootstrap-studio # to build websites
#brew cask install brave-browser # secure browser
#brew cask install brackets # IDE
brew cask install calibre # ebook manager
#brew cask install chromedriver # chrome driver for selenium
brew cask install cyberduck # browse S3 and other servers
brew cask install discord # chat app
brew cask install docker # docker client
brew cask install dropbox # cloud storage
brew cask install evernote # note taking
brew cask install filezilla # file transfer
brew cask install firefox # web browser
brew cask install google-chrome # web browser
#brew cask install google-earth-pro # view earth in 3D
#brew cask install gpgtools # GPG tools
brew cask install iterm2 # terminal
#brew cask install inkscape # vector graphics editor
brew cask install java #or java7
brew cask install jdownloader # download manager
#brew cask install karabiner # keyboard settings
brew cask install macvim # vim for mac
brew cask install microsoft-teams # team communication
#brew cask install mudlet # MUD Client
brew cask install ngrok # tunneling
brew cask install opera # web browser
#brew cask install phpstorm # PHP IDE
#brew cask install poedit # PO editor
#brew cask install popcorn-time # video streaming
brew cask install postman # for testing REST APIs
brew cask install private-internet-access # VPN
brew cask install qbittorrent # torrent client
#brew cask install radiant-player # video streaming
brew cask install rar # rar archiver
brew cask install reaper # to record instruments
#brew cask install robomongo # MongoDB client
#brew cask install silverlight # Silverlight
#brew cask install silicon-labs-vcp-driver # VCP driver
brew cask install skype # chat app
#brew cask install slack # chat app
#brew cask install sourcetree # source control
#brew cask install spectacle # window manager
brew cask install spotify # music streaming
brew cask install steam # gaming
#brew cask install sublime-text3 # text editor
brew cask install teamviewer # remote desktop
#brew cask install tftpserver # TFTP server
brew cask install the-unarchiver # unarchiver
#brew cask install tomighty # time tracker
brew cask install tor-browser # browser
brew cask install tripmode # to handle connections
brew cask install tunnelblick # VPN
#brew cask install tweeten # twitter client
#brew cask install twitch # streaming
#brew cask install vagrant # virtual machine
#brew cask install virtualbox # virtual machine
brew cask install visual-studio-code # Best IDE
brew cask install vlc # video player
#brew cask install wireshark # network sniffer
#brew cask install whatsapp # chat app
#brew cask install wireshark-dev # network sniffer
brew cask install wkhtmltopdf # to convert html to pdf
#brew cask install yubikey-neo-manager # YubiKey manager
#brew cask install yubikey-personalization-gui # YubiKey manager
#brew cask install zeplin # design tool
brew cask cleanup # clean cache after installing
echo -e "*** Installed Cask Packages! ***"
sleep 2
}
funNPM() {
echo -e "*** Installing NPM Packages and node ***"
sleep 1
curl -L https://www.npmjs.com/install.sh | sudo sh
npm install -g n yo bower eslint grunt-cli gulp less coffee-script jshint node-inspector generator-polymer babel yarn vue-cli
sudo n stable
sudo n prune
echo -e "*** Installed NPM Packages and node! ***"
sleep 2
}
funAPM() {
echo -e "*** Installing Atom Packages ***"
sleep 1
apm install activate-power-mode
apm install atom-clock
apm install color-picker
apm install linter
apm install linter-eslint
apm install linter-jshint
apm install merge-conflicts
apm install minimap
apm install python-debugger
echo -e "*** Installed Atom Packages! ***"
sleep 2
}
funOhMyZsh() {
echo -e "*** Installing Oh My Zsh ***"
sleep 1
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo -e "*** Installed Oh My Zsh! ***"
sleep 2
}
funScripts() {
echo -e "*** Installing scripts ***"
CURRENT_FOLDER=`pwd`
BACKUP_FOLDER=".dotfiles_backup"
# init and update submodules
git submodule init
git submodule update
cd ~
# backup your files
rm -rf $BACKUP_FOLDER
mkdir $BACKUP_FOLDER
mv .bowerrc $BACKUP_FOLDER
mv .gitconfig $BACKUP_FOLDER
mv .gitignore $BACKUP_FOLDER
mv .zshrc $BACKUP_FOLDER
mv .zshrc.d $BACKUP_FOLDER/.zshrc.d
mv .screenrc $BACKUP_FOLDER
mv .vimrc $BACKUP_FOLDER
mv .osx $BACKUP_FOLDER
mv .editorconfig $BACKUP_FOLDER
# remove old folders
rm .git-mods
rm .vim
# link files from dotfiles to real ones
ln -s $CURRENT_FOLDER/dotfiles/bowerrc .bowerrc
ln -s $CURRENT_FOLDER/dotfiles/zshrc .zshrc
ln -s $CURRENT_FOLDER/dotfiles/gitconfig .gitconfig
ln -s $CURRENT_FOLDER/dotfiles/gitignore .gitignore
ln -s $CURRENT_FOLDER/dotfiles/screenrc .screenrc
ln -s $CURRENT_FOLDER/dotfiles/vimrc .vimrc
ln -s $CURRENT_FOLDER/dotfiles/osx .osx
ln -s $CURRENT_FOLDER/dotfiles/editorconfig .editorconfig
# link folders from dotfiles to real ones
ln -s $CURRENT_FOLDER/dotfiles/zshrc.d .zshrc.d
ln -s $CURRENT_FOLDER/dotfiles/git-mods .git-mods
ln -s $CURRENT_FOLDER/.vim .vim
# add private aliases if you have them in Dropbox
if [ -f ~/Dropbox/bash_aliases_private.zsh ]; then
ln -fs ~/Dropbox/bash_aliases_private.zsh .zshrc.d/
fi
# add mac-init alias
echo "alias mac-init='cd `echo $CURRENT_FOLDER`; ./init.me'" >> .zshrc.d/mac-init.zsh
. ~/.osx
cd $CURRENT_FOLDER
echo -e "*** Installed scripts! ***"
sleep 2
}
funUpdateAll() {
funUntapTap
echo -e "*** Updating brew packages ***"
sleep 1
brew update && brew upgrade --all
sleep 2
echo -e "*** Updating Node.js stable (using n) and NPM ***"
sleep 1
curl -L https://www.npmjs.com/install.sh | sudo sh
sudo n stable
sudo n prune
sleep 2
echo -e "*** Updating npm packages ***"
sleep 1
npm update -g
sleep 2
#echo -e "*** Updating atom packages ***"
#sleep 1
#apm update --confirm=false
echo -e "*** Everything updated! ***"
sleep 2
}
funCleanCaches() {
echo -e "*** Cleaning caches ***"
sleep 1
brew cleanup
brew cask cleanup
npm cache clean
yarn cache clean
#apm clean
echo -e "*** Everything clean! ***"
sleep 2
}
clear
echo "Sudoing first"
sudo echo ""
while [ $EXIT==0 ]
do
echo -e "*****************************************************************"
echo -e "* Mac Initializer *"
echo -e "*****************************************************************"
echo -e "* Just select what do you want to install *"
echo -e "* or install everything *"
echo -e "*****************************************************************"
echo -e "* Made by serginator *"
echo -e "*****************************************************************"
echo
echo -e "Options:"
echo -e " 1) RVM 2) Homebrew"
echo -e " 3) Brew packages 4) Brew cask packages"
echo -e " 5) NPM packages 6) Atom packages"
echo -e " 7) Oh My Zsh 8) Config and aliases"
echo
echo -e " 9) Everything"
echo -e " 10) Update all"
echo -e " 11) Clean caches"
echo -e " 0) Exit"
echo -n "What do you want to do? "
read OPTION
case $OPTION in
1 )
funRVM
;;
2 )
funHomebrew
;;
3 )
funBrewPackages
;;
4 )
funCaskPackages
;;
5 )
funNPM
;;
6 )
funAPM
;;
7 )
funOhMyZsh
;;
8 )
funScripts
;;
9 )
funRVM
funHomebrew
funBrewPackages
funCaskPackages
funNPM
# funAPM
funOhMyZsh
funScripts
;;
10 )
funUpdateAll
funCleanCaches
;;
11 )
funCleanCaches
;;
0 )
clear
echo "Good luck my friend!"
exit
esac
clear
done