-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-deps.sh
executable file
·158 lines (133 loc) · 4.21 KB
/
setup-deps.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
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
#!/usr/bin/env bash
set -e
# set -o verbose
echo "##### $(basename $BASH_SOURCE) #####"
DOTFILES_ROOT="`pwd`"
# make sure git submodules are up to date
cd $DOTFILES_ROOT && git submodule update --init
########################################
# helpers
########################################
brew_install() {
formula="$1"
set +e
already_installed="no"
test -z "$(brew ls --versions $formula)" || already_installed="yes"
set -e
echo "$formula already installed with brew: $already_installed"
[ $already_installed = "yes" ] || brew install $formula
}
npm_install() {
formula="$1"
set +e
already_installed="no"
npm list -g | grep -q "$formula@" && already_installed="yes"
set -e
echo "$formula already installed with npm: $already_installed"
[ $already_installed = "yes" ] || npm install -g $formula
}
install_git_repo() {
repo="$1"
target_dir="$2"
if ! test -d $target_dir; then
echo "installing $repo"
# legacy location, lots of deps remaining on this:
git clone "$repo" "$target_dir"
cd $target_dir
git submodule update --init --recursive
cd -
fi
}
# 'fix' permissions on usr local setting current usr as owner
# assumes only one person, you, is using your machine
# sudo chown -R "`id -u -n`:admin" /usr/local
sudo chown -R $(whoami) $(brew --prefix)/*
########################################
# libs
########################################
# xcode-select --install # must be install via app store now
brew_install CMake
brew_install git # so that it has completion
brew_install bash-completion
# brew tap homebrew/completions
brew_install rails-completion
brew_install git-lfs
brew_install fzf
brew_install fswatch
brew_install ctop
brew_install ctags
brew_install heroku/brew/heroku
brew_install python
brew_install tmux
brew_install languagetool
brew_install youtube-dl
brew_install the_silver_searcher # WAY faster than ack
brew_install rbenv
brew install reattach-to-user-namespace
brew_install vim # need vim8 for ale
brew_install yarn
brew tap caskroom/cask
########################################
# java (for languagetool)
########################################
brew tap caskroom/versions
brew cask install java
# caffeine replacement
# brew cask install keepingyouawake
test -e /Applications/Cyberduck.app || brew cask install cyberduck
########################################
# pip
########################################
if ! command -v pip >/dev/null 2>&1; then
echo "re-installing python"
# NB: cannot easy_install once you brew install python
brew reinstall python
fi
pip3 install ansible
pip3 install autopep8
pip3 install boto
pip3 install flake8
pip3 install ipython
pip3 install mock # python 2.7
pip3 install nose
pip3 install nose-run-line-number
pip3 install watchdog
########################################
# misc
########################################
SRC_DIR="$HOME/src"
test -e $SRC_DIR || mkdir -p $SRC_DIR
# if [ "`id -u -n`" = "kortina" ] && [ ! -f "$HOME/.bash_mac_private" ]; then echo "~/.bash_mac_private does not exist. exiting."; exit 1; fi;
########################################
# various symlinks
########################################
# test -L "/Applications/Screen Sharing.app" || ln -s "/System/Library/CoreServices/Screen Sharing.app" "/Applications/Screen Sharing.app"
########################################
# node modules
########################################
brew_install node
npm_install eslint
npm_install eslint-plugin-react
npm_install eslint-plugin-flowtype
npm_install babel-eslint
npm_install livedown
npm_install prettier
########################################
# ruby gems
########################################
test -e ~/.gemrc && grep -q "no-document" ~/.gemrc || echo "gem: --no-document" >> ~/.gemrc
rbenv versions | grep -q "2\.3\.3" || rbenv install 2.3.3
rbenv global 2.3.3
# You may need to fix readline in irb by doing the following:
# xcode-select --install
# rbenv install -f 2.3.3 && RBENV_VERSION=2.3.3 gem pristine --all
gem install docker-sync
gem install cocoapods
gem install overcommit
gem install teamocil
gem install rb-readline
gem install rubocop
########################################
# vim
########################################
vim +PlugInstall +qall