-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
106 lines (77 loc) · 2.3 KB
/
install.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
set -ex
export DOTFILES_ROOT=$HOME/.dotfiles
install_bash() {
ln -s $DOTFILES_ROOT/bash/.bashrc $HOME/.bashrc
}
uninstall_bash() {
rm -f $HOME/.bashrc
}
install_git() {
ln -s $DOTFILES_ROOT/git/.gitconfig $HOME/.gitconfig
ln -s $DOTFILES_ROOT/git/.gitignore $HOME/.gitignore
}
uninstall_git() {
rm -f $HOME/.gitconfig
rm -f $HOME/.gitignore
}
install_python() {
ln -s $DOTFILES_ROOT/python/.pdbrc $HOME/.pdbrc
ln -s $DOTFILES_ROOT/python/.pylintrc $HOME/.pylintrc
ln -s $DOTFILES_ROOT/python/pyproject.toml $HOME/pyproject.toml
mkdir -p $HOME/.ipython/profile_default
ln -s $DOTFILES_ROOT/python/ipython_config.py $HOME/.ipython/profile_default/ipython_config.py
pip3 install black==22.3.0 pylint==2.13.9 pynvim==0.4.3
}
uninstall_python() {
rm -f $HOME/.pdbrc
rm -f $HOME/.pylintrc
rm -f $HOME/pyproject.toml
rm -f $HOME/.ipython/profile_default/ipython_config.py
}
install_screen() {
ln -s $DOTFILES_ROOT/screen/.screenrc $HOME/.screenrc
}
uninstall_screen() {
rm -f $HOME/.screenrc
}
install_vim() {
ln -s $DOTFILES_ROOT/vim/.vimrc $HOME/.vimrc
ln -s $DOTFILES_ROOT/vim/.vim $HOME/.vim
mkdir -p $HOME/.config/nvim
ln -s $DOTFILES_ROOT/vim/init.vim $HOME/.config/nvim/init.vim
cd $DOTFILES_ROOT/vim/.vim/bundle/fzf
./install --bin
cd $DOTFILES_ROOT/vim/.vim/bundle/coc.nvim
npm install -g yarn
yarn install
npm install esbuild
npm run build
}
uninstall_vim() {
rm -f $HOME/.vimrc
rm -rf $HOME/.vim
rm -f $HOME/.config/nvim/init.vim
}
uninstall_all() {
uninstall_bash
uninstall_git
uninstall_python
uninstall_screen
uninstall_vim
}
if [ $# -eq 0 ]; then
echo "=============================================================================="
echo "must specify function(s) to run"
echo "=============================================================================="
else
for func in "$@"
do
echo "=============================================================================="
echo "starting install.sh $func"
echo "=============================================================================="
$func
echo "=============================================================================="
echo "finished install.sh: $func"
echo "=============================================================================="
done
fi