-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
175 lines (133 loc) · 3.81 KB
/
setup.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#!/bin/bash
# setting
kbk_dir=Develop/kubocker/dotfiles
# start
echo "Start setting of dotfiles..."
dotfiles=(
.bashrc
.bash_profile
.gitconfig
.gitignore_global
.tmux.conf
.vimrc
.hyper.js
)
dir=$(pwd)
if [ $dir != $HOME/$kbk_dir ]; then
echo "WARNING..."
echo "change path $kbk_dir"
return
fi
echo 'setup packages....'
source $HOME/$kbk_dir/apps/_install.sh
# pyenv
if [ ! -e ~/.pyenv ]; then
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
fi
# rbenv
if [ ! -e ~/.rbenv ]; then
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
fi
# nodenv
if [ ! -e ~/.nodenv ]; then
git clone git://github.com/nodenv/nodenv.git ~/.nodenv
git clone https://github.com/nodenv/node-build.git ~/.nodenv/plugins/node-build
git clone git://github.com/nodenv/node-build-update-defs.git ~/.nodenv/plugins/node-build-update-defs
### nodenv update-version-defs
fi
# phpenv
if [ ! -e ~/.phpenv ]; then
curl -L https://raw.github.com/CHH/phpenv/master/bin/phpenv-install.sh | bash
git clone git://github.com/CHH/php-build.git ~/.phpenv/plugins/php-build
# git clone https://github.com/ngyuki/phpenv-composer.git ~/.phpenv/plugins/phpenv-composer
curl -s getcomposer.org/installer | php -d detect_unicode=Off
fi
# goenv
if [ ! -e ~/.goenv ]; then
git clone https://github.com/syndbg/goenv.git ~/.goenv
fi
## dep
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
# flutter
if [ ! -e ~/.flutter ]; then
git clone https://github.com/flutter/flutter.git ~/flutter
fi
# SDKMAN
# if [ ! -e ~/.sdkman ]; then
# curl -s https://get.sdkman.io | bash
# source "/Users/kubocker/.sdkman/bin/sdkman-init.sh"
# fi
# rust
if [ ! -e ~/.cargo ]; then
curl https://sh.rustup.rs -sSf | sh
fi
# deno
if [ ! -e ~..deno ]; then
curl -fsSL https://deno.land/x/install/install.sh | sh
fi
# haskell
if [ ! -e ~/.stack ]; then
curl -sSL https://get.haskellstack.org/ | sh
fi
# nim
if [ ! -e ~/.nimble ]; then
git clone https://github.com/nim-lang/nimble.git ~/.nimble
fi
# emscripten
if [ ! -e ~/emsdk ]; then
git clone https://github.com/juj/emsdk.git
# git clone git://github.com/kripken/emscripten.git ~/.emscripten
fi
echo 'firebase tools'
curl -sL firebase.tools | bash
echo 'git prompt'
# git-prompt
if [ ! -e ~/.git-prompt.sh ]; then
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
fi
echo 'git completion'
# git-completion
if [ ! -e ~/.git-completion.bash ]; then
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash > ~/.git-completion.bash
fi
echo 'starship'
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
echo 'Checking...'
if [ -e $HOME/.vim ]; then
echo 'rm -rf ~/.vim; then mkdir ~/.vim'
rm -rf $HOME/.vim
fi
echo "Installing vim-plug"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo "Installing Substrate"
# curl https://getsubstrate.io -sSf | bash
echo "make... symbolink"
for file in ${dotfiles[@]}
do
rm -rf $HOME/$file
# if [ -e $HOME/$file ]; then
# rm -rf $HOME/$file
# fi
ln -s $HOME/$kbk_dir/dotfiles/$file $HOME/$file
done
# vim-plug
echo "Installing Vim Plugin"
vim +PlugInstall +qall
# SpaceVim
# echo "Installing SpaceVim..."
# curl -sLf https://spacevim.org/install.sh | bash -s -- --install vim
# source
echo "source ~/.bash_profile and ~/.bashrc"
# source ~/.bash_profile
# source ~/.bashrc
#exec $SHELL -l # 再読み込み
echo 'setup packages....'
source $HOME/$kbk_dir/packages/_setup.fish
echo 'setup config....'
source $HOME/$kbk_dir/config/_setup.sh
echo 'setup home....'
source $HOME/$kbk_dir/home/_setup.sh
echo "setting tmux"
tmux source-file ~/.tmux.conf
echo "End setting of dotfiles"