-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
executable file
·96 lines (72 loc) · 2.45 KB
/
init.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
#---------------- ~/.config/nvim setup ----------------
if [ ! -d ~/.config ]; then
mkdir ~/.config
fi
if [ ! -d ~/.config/NeoVimConfig ]; then
cp -r '../NeoVimConfig' ~/.config/
fi
if [ ! -d ~/.config/nvim ]; then
mv ~/.config/NeoVimConfig ~/.config/nvim
fi
if [ -d ~/.config/NeoVimConfig ]; then
rm -r -f ~/.config/NeoVimConfig
fi
#(for Mac)
#---------------- pyenv setup ----------------
if [ "$(uname)" == 'Darwin' ]; then
# When OS is Mac.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install neovim
brew install pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
source ~/.zshrc
brew install pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
source ~/.zshrc
sudo installer -pkg '/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg' -target /
pyenv install '3.7.0'
pyenv virtualenv '3.7.0' 'forVim'
pyenv activate 'forVim'
pip install 'autopep8'
pip install 'black'
pip install 'isort'
pip install 'flake8'
pip install 'pynvim'
pip install 'jedi'
elif [ "$(expr substr $(uname -s) 1 5)" == 'Linux' ]; then
# When OS is Linux.
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
# for pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
source ~/.zshrc
# for virtualenv
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
source ~/.zshrc
pyenv install '3.7.0'
pyenv virtualenv '3.7.0' 'forVim'
pyenv activate 'forVim'
pip install 'autopep8'
pip install 'black'
pip install 'isort'
pip install 'flake8'
pip install 'pynvim'
pip install 'jedi'
fi
#---------------- rbenv setup ----------------
#brew install rbenv
#brew install postgresql
#brew install yarn
#echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
#echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
#brew install ruby-build
#brew install rbenv-gemset
#brew install rbenv-gem-rehash
#rbenv install '2.5.0'
#rbenv rehash
#rbenv global '2.5.0'
#gem install bundler