-
Notifications
You must be signed in to change notification settings - Fork 4
/
install.sh
executable file
·192 lines (176 loc) · 10.4 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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#!/usr/bin/env bash -xe
# Setup Variables
DEST_NEOVIM_DIRECTORY=~/.config/nvim
NEOVIM_CONFIGURATION=init.vim
SOURCE_DIRECTORY=~/gitrepos/shellconfig
CURRENT_DIRECTORY=$(pwd)
clear
asciiwelcome() {
cat << "EOT"
███████╗████████╗███████╗██████╗ ██╗ ██╗███████╗███╗ ██╗██╗ ██╗██╗ ██╗██╗ ██╗
██╔════╝╚══██╔══╝██╔════╝██╔══██╗██║ ██║██╔════╝████╗ ██║██║ ██║██║ ██║██║ ██║
███████╗ ██║ █████╗ ██████╔╝███████║█████╗ ██╔██╗ ██║███████║██║ ██║███████║
╚════██║ ██║ ██╔══╝ ██╔═══╝ ██╔══██║██╔══╝ ██║╚██╗██║██╔══██║██║ ██║██╔══██║
███████║ ██║ ███████╗██║ ██║ ██║███████╗██║ ╚████║██║ ██║╚██████╔╝██║ ██║
╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
███████╗██╗ ██╗███████╗██╗ ██╗ ██████╗ ██████╗ ███╗ ██╗███████╗██╗ ██████╗
██╔════╝██║ ██║██╔════╝██║ ██║ ██╔════╝██╔═══██╗████╗ ██║██╔════╝██║██╔════╝
███████╗███████║█████╗ ██║ ██║ ██║ ██║ ██║██╔██╗ ██║█████╗ ██║██║ ███╗
╚════██║██╔══██║██╔══╝ ██║ ██║ ██║ ██║ ██║██║╚██╗██║██╔══╝ ██║██║ ██║
███████║██║ ██║███████╗███████╗███████╗ ╚██████╗╚██████╔╝██║ ╚████║██║ ██║╚██████╔╝
╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝
██╗ ██╗███████╗██╗ ██████╗ ██████╗ ███╗ ███╗███████╗
██║ ██║██╔════╝██║ ██╔════╝██╔═══██╗████╗ ████║██╔════╝
██║ █╗ ██║█████╗ ██║ ██║ ██║ ██║██╔████╔██║█████╗
██║███╗██║██╔══╝ ██║ ██║ ██║ ██║██║╚██╔╝██║██╔══╝
╚███╔███╔╝███████╗███████╗╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗██╗██╗██╗██╗██╗██╗██╗██╗██╗██╗
╚══╝╚══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝╚═╝╚═╝╚═╝╚═╝╚═╝╚═╝╚═╝╚═╝╚═╝
EOT
}
asciibye(){
cat << "EOT"
_,,ad8888888888bba,_
,ad88888I888888888888888ba,
,88888888I88888888888888888888a,
,d888888888I8888888888888888888888b,
d88888PP"""" ""YY88888888888888888888b,
,d88"'__,,--------,,,,.;ZZZY8888888888888,
,8IIl'" ;;l"ZZZIII8888888888,
,I88l;' ;lZZZZZ888III8888888,
,II88Zl;. ;llZZZZZ888888I888888,
,II888Zl;. .;;;;;lllZZZ888888I8888b
,II8888Z;; `;;;;;''llZZ8888888I8888,
II88888Z;' .;lZZZ8888888I888b
II88888Z; _,aaa, .,aaaaa,__.l;llZZZ88888888I888
II88888IZZZZZZZZZ, .ZZZZZZZZZZZZZZ;llZZ88888888I888,
II88888IZZ<'(@@>Z| |ZZZ<'(@@>ZZZZ;;llZZ888888888I88I
,II88888; `""" ;| |ZZ; `""" ;;llZ8888888888I888
II888888l `;; .;llZZ8888888888I888,
,II888888Z; ;;; .;;llZZZ8888888888I888I
III888888Zl; .., `;; ,;;lllZZZ88888888888I888
II88888888Z;;...;(_ _) ,;;;llZZZZ88888888888I888,
II88888888Zl;;;;;' `--'Z;. .,;;;;llZZZZ88888888888I888b
]I888888888Z;;;;' ";llllll;..;;;lllZZZZ88888888888I8888,
II888888888Zl.;;"Y88bd888P";;,..;lllZZZZZ88888888888I8888I
II8888888888Zl;.; `"PPP";;;,..;lllZZZZZZZ88888888888I88888
II888888888888Zl;;. `;;;l;;;;lllZZZZZZZZW88888888888I88888
`II8888888888888Zl;. ,;;lllZZZZZZZZWMZ88888888888I88888
II8888888888888888ZbaalllZZZZZZZZZWWMZZZ8888888888I888888,
`II88888888888888888b"WWZZZZZWWWMMZZZZZZI888888888I888888b
`II88888888888888888;ZZMMMMMMZZZZZZZZllI888888888I8888888
`II8888888888888888 `;lZZZZZZZZZZZlllll888888888I8888888,
II8888888888888888, `;lllZZZZllllll;;.Y88888888I8888888b,
,II8888888888888888b .;;lllllll;;;.;..88888888I88888888b,
II888888888888888PZI;. .`;;;.;;;..; ...88888888I8888888888,
II888888888888PZ;;';;. ;. .;. .;. .. Y8888888I88888888888b,
,II888888888PZ;;' `8888888I8888888888888b,
II888888888' 888888I8888888888888888b
,II888888888 ,888888I88888888888888888
,d88888888888 d888888I8888888888ZZZZZZZ
,ad888888888888I 8888888I8888ZZZZZZZZZZZZZ
,d888888888888888' 888888IZZZZZZZZZZZZZZZZZZ
,d888888888888P'8P' Y888ZZZZZZZZZZZZZZZZZZZZZ
,8888888888888, " ,ZZZZZZZZZZZZZZZZZZZZZZZZ
d888888888888888, ,ZZZZZZZZZZZZZZZZZZZZZZZZZZZ
888888888888888888a, _ ,ZZZZZZZZZZZZZZZZZZZZ888888888
888888888888888888888ba,_d' ,ZZZZZZZZZZZZZZZZZ88888888888888
8888888888888888888888888888bbbaaa,,,______,ZZZZZZZZZZZZZZZ888888888888888888
88888888888888888888888888888888888888888ZZZZZZZZZZZZZZZ888888888888888888888
8888888888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888
888888888888888888888888888888888888888ZZZZZZZZZZZZZZ888888888888888888888888
8888888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888888
88888888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888888
8888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888 Normand 88
88888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888 Veilleux 88
8888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888888888888
EOT
}
asciiwelcome
echo "Well congrats on taking the big step into my .vim config!"
echo "Before using this make sure your shellconfig repository is in ~/.vim"
echo "Before proceeding, if you want to keep your .vimrc then back that shit up!\n"
# Classic Vim
while true; do
read -p "Do you want to install vimrc y or n (this is for vim classic not neovim)? " yn
case $yn in
[Yy]* )
ln -sf $CURRENT_DIRECTORY/vimrc ~/.vimrc ;
git submodule update --init ;
break;;
[Nn]* ) echo "Skipping vimrc";
break;;
* ) echo "Please answer yes or no.";
echo "";;
esac
echo "We're done with vimrc"
sleep 1
done
# NeoVim
while true; do
echo "Do you want to install the vim configurations for NeoVim?"
read wants_neovim_config
if [ ! -f init.vim ]; then
echo "init.vim doesnt exist, exiting...";
exit;
fi
if [[ $wants_neovim_config =~ Y|y|yes ]]; then
echo "Configuring NeoVim"
mkdir -p $DEST_NEOVIM_DIRECTORY && ln -sf $SOURCE_DIRECTORY/$NEOVIM_CONFIGURATION $DEST_NEOVIM_DIRECTORY
break
elif [[ $wants_neovim_config =~ N|n ]]; then
echo "Skipping Neovim Configuration";
break;
else
echo "Please answer with a valid answer: Y|n or N|n"
fi
done
# TMUX
while true; do
read -p "Do you want to install tmux.conf y or n? " yn
case $yn in
[Yy]* )
ln -sf $CURRENT_DIRECTORY/tmux.conf ~/.tmux.conf ;
break;;
[Nn]* ) echo "Skipping tmux.conf";
break;;
* ) echo "Please answer yes or no.";
echo "";;
esac
echo "We're done with tmux.conf"
sleep 1
done
# ZSH
while true; do
read -p "Do you want to install zshrc y or n? " yn
case $yn in
[Yy]* )
ln -sf $CURRENT_DIRECTORY/zshrc ~/.zshrc ;
break;;
[Nn]* ) echo "Done with zshrc";
break;;
* ) echo "Please answer yes or no.";
echo "";;
esac
echo "We're done with zshrc"
sleep 1
done
# GNOME terminal w/ TMUX
while true; do
echo "We're going to add a tmux alias to your bashrc if you're on a GNOME terminal"
read -p "Are you on an GNOME Terminal right now? y or n? " yn
case $yn in
[Yy]* )
cat $CURRENT_DIRECTORY/bashrc >> ~/.bashrc
break;;
[Nn]* ) echo "Done with bash configs for GNOME terminals";
break;;
* ) echo "Please answer yes or no.";
echo "";;
esac
echo "We're done with bashrc"
sleep 1
done
printf "\n\n\n\n"
asciibye
printf "\n\n\n\n"
echo "You have a kick-ass shell. Thanks for using shellconfig. Fork and star me"