-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.install.sh
More file actions
executable file
·206 lines (163 loc) · 4.46 KB
/
Copy path.install.sh
File metadata and controls
executable file
·206 lines (163 loc) · 4.46 KB
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
#! /bin/sh
###########
#
# First, download & install XCode Dev Tools — https://developer.apple.com/downloads/
#
###########
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing.
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# borrowed from https://github.com/thoughtbot/laptop
append_to_zshrc() {
local text="$1" zshrc
local skip_new_line="${2:-0}"
if [ -w "$HOME/.zshrc.local" ]; then
zshrc="$HOME/.zshrc.local"
else
zshrc="$HOME/.zshrc"
fi
if ! grep -Fqs "$text" "$zshrc"; then
if [ "$skip_new_line" -eq 1 ]; then
printf "%s\n" "$text" >> "$zshrc"
else
printf "\n%s\n" "$text" >> "$zshrc"
fi
fi
}
echo "Checking for Homebrew..."
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
echo "Setting brew permissions..."
chown -R $USER /usr/local/include
chown -R $USER /usr/local/lib/pkgconfig
# Inspired by http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
echo "Updating brew..."
brew update
echo "Installing GNU core utils (those that come with OS X are outdated)..."
brew install coreutils
echo "Installing more recent versions of some OS X tools..."
brew tap homebrew/dupes
brew install homebrew/dupes/grep
# TODO add utils to zsh path
binaries=(
ack
autojump
curl
casperjs
ffmpeg
git
git-extras
grep
mackup
node
postgresql
pkg-config
redis
rhino
reattach-to-user-namespace
tree
tmux
unrar
wget
youtube-dl
zsh
)
echo "Installing binaries..."
brew install ${binaries[@]}
echo "Cleaning up..."
brew cleanup
echo "Installing Cask..."
brew install caskroom/cask/brew-cask
echo "Adding nightly/beta Cask versions..."
brew tap caskroom/versions
# Apps
apps=(
# work
iterm2
sublime-text3
virtualbox
# productivity, core, runtimes
caffeine
quicksilver
nvalt
appcleaner
# osxfuse
# 1password
# spectacle
# flash
# quicklook-json
# macpar-deluxe
# imageoptim
grandperspective
istat-menus
# qlvideo # to display video files in finder and quick look
# sharing
# dropbox
# google-drive
# browsers
google-chrome
firefox-nightly
webkit-nightly
# communication
# slack
# skype
# entertainment
# vlc
# pandora
# file sharing
# utorrent # needs further installation
)
echo "Installing apps to /Applications..."
brew cask install --appdir="/Applications" ${apps[@]}
brew cask cleanup
echo "Installing neovim"
brew install neovim/neovim/neovim
echo "Installing oh-my-zsh..."
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo "Customizing oh-my-zsh..."
wget https://raw.githubusercontent.com/wunderg/dotfiles/master/.zshrc && mv .zshrc ~/
echo "Customizing tmux"
wget https://raw.githubusercontent.com/wunderg/dotfiles/master/.tmux.conf && mv .tmux.conf ~/
echo "Customizing Vim"
brew uninstall vim
brew install vim --override-system-vi --with-python3 --with-lua
wget https://raw.githubusercontent.com/wunderg/dotfiles/master/.vimrc && mv .vimrc ~/
echo "Making autojump work with zsh..."
append_to_zshrc '[[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh'
echo "Generating SSH keys (https://help.github.com/articles/generating-ssh-keys)..."
ssh-keygen -t rsa -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
pbcopy < ~/.ssh/id_rsa.pub
open https://github.com/settings/ssh
git config --global core.editor /usr/bin/vim
git config --global user.name 'oumarov'
git config --global user.email '[email protected]'
echo "Customizing OSX..."
wget -qO- https://raw.githubusercontent.com/wunderg/dotfiles/master/.install.sh | bash
echo "Installing translit..."
wget http://www.math.tamu.edu/~comech/tools/russian-translit-keyboard-layout-mac-os-x/russian-translit.keylayout && mv russian-translit.keylayout ~/Library/Keyboard\ Layouts/
echo "Installing nvm..."
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
echo "Installing global node packages..."
node_packages=(
bower
browserify
caniuse-cmd
htmlhint
mocha
eslint_d
jscs
watchify
)
npm install -g ${node_packages[@]}
echo 'Getting Vundle'
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
echo 'Installing plugins'
vim +PluginInstall +qall
echo 'Installing cmake for YCM'
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer