-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·87 lines (68 loc) · 2.08 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
#!/bin/bash -x
# A quick script to install pluggins
## To install or not to install?
## - set to true if you want to install
## - if you choose not to install something, you may need to go back and edit associated files
# Install all -- overrides the settings below
INSTALL_ALL=True
# bash
INSTALL_BASHRC=False
# xmonad
INSTALL_XMONAD_CONFIG=False
INSTALL_XMOBARRC=False
# vim
INSTALL_VIMRC=False
INSTALL_VIMPLUG=False
INSTALL_COCCONFIG=False
# starship
INSTALL_STARSHIP=False
# where to install
INSTALL_DIR=~
#################################################################################
## DO NOT EDIT ANYTHING BELOW THIS LINE!
#################################################################################
function install_config_file() {
cp -r $1 $INSTALL_DIR
}
# check to see if we should install everything
if [ "$INSTALL_ALL" = "True" ]; then
INSTALL_BASHRC=True
INSTALL_XMONAD_CONFIG=True
INSTALL_XMOBARRC=True
INSTALL_VIMRC=True
INSTALL_VIMPLUG=True
INSTALL_COCCONFIG=True
INSTALL_STARSHIP=True
fi
# install bash stuff
if [ "$INSTALL_BASHRC" = "True" ]; then
install_config_file "./bash/.bash_extra"
install_config_file "./bash/.bash_aliases"
echo -e '\n. $HOME/.bash_extra' >> $HOME/.bashrc
fi
# install xmonad stuff
if [ "$INSTALL_XMONAD_CONFIG" = "True" ]; then
install_config_file "./wm/.xmonad"
fi
if [ "$INSTALL_XMOBARRC" = "True" ]; then
install_config_file "./wm/.xmobarrc"
fi
# install vim
if [ "$INSTALL_VIMRC" = "True" ]; then
install_config_file "./vim/.vimrc"
fi
if [ "$INSTALL_VIMPLUG" = "True" ]; then
mkdir -p $INSTALL_DIR/.vim/autoload && \
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim && \
vim +PlugInstall +qall
fi
if [ "$INSTALL_COCCONFIG" = "True" ]; then
mkdir -p $INSTALL_DIR/.vim
cp coc-settings.json $INSTALL_DIR/.vim/
cp coc-settings.json $INSTALL_DIR/.config/nvim/
fi
if [ "$INSTALL_STARSHIP" = "True" ]; then
mkdir -p $INSTALL_DIR/.config
cp ./bash/starship.toml $INSTALL_DIR/.config/
fi