-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·113 lines (100 loc) · 3.23 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
#!/bin/bash
ENV_DIR=env/
BASE_ENV=base
# sudo apt-get build-dep vim
# sudo apt-get build-dep libx11-dev libxtst-dev
# core: quiet i915.i915_enable_rc6=1 i915.i915_enable_fbc=1
for config in `ls -1A lib`
do
echo "linking library $config"
rm -r "$HOME/$config" 2> /dev/null
ln -s "`pwd`/lib/$config" "$HOME/$config"
done
PS3="Choose available environment: "
options=`ls -1A $ENV_DIR`
select SELECTED_ENV in $options
do
case $opt in
*) break;;
esac
done
while true; do
read -p "Using $SELECTED_ENV as source. Is this correct? " yn
case $yn in
[Yy]* ) echo "--> Perform $SELECTED_ENV environment install."; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
for config in `ls -1A $ENV_DIR$BASE_ENV`
do
echo "linking base $config"
rm -r "$HOME/$config" 2> /dev/null
ln -s "`pwd`/$ENV_DIR$BASE_ENV/$config" "$HOME/$config"
done
for config in `ls -1A $ENV_DIR$SELECTED_ENV`
do
echo "linking $SELECTED_ENV $config"
rm -r "$HOME/$config" 2> /dev/null
ln -s "`pwd`/$ENV_DIR$SELECTED_ENV/$config" "$HOME/$config"
done
while true; do
read -p "Apply default VIM environment?" yn
case $yn in
[Yy]* ) cp "$HOME/.vim/.vimrc-environment.default.vim" "$HOME/.vim/.vimrc-environment.vim"; echo "--> default VIM environment installed."; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Load VIM plugins now? " yn
case $yn in
[Yy]* ) vim -c BundleInstall! -c q -c q -u "$HOME/.vim/.vimrc-bundles.vim"; echo "--> VIM plugins are loaded."; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
echo "Installing extra stuff:"
while true; do
read -p "Update colors in your system to match with VIM colorshema? " yn
case $yn in
[Yy]* ) bash "`pwd`/extra/gnome-terminal-colors-solarized/install.sh"; echo "--> Colorshema changed."; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Install custom keyboard layout? " yn
case $yn in
[Yy]* ) sudo cp "`pwd`/extra/keyboard_layouts/us" "/usr/share/X11/xkb/symbols/"; echo "--> New layout copied to '/usr/share/X11/xkb/symbols/us'"; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Install fonts in your system to match with VIM configuration? " yn
case $yn in
[Yy]* ) cp -R "`pwd`/extra/powerline-fonts" "$HOME/.fonts" ;echo "Updating fonts..."; echo `fc-cache -fv | grep "fc-cache"`; echo "--> Fonts updated"; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Set default rvm gems? " yn
case $yn in
[Yy]* ) cp -R "`pwd`/extra/.rvm" "$HOME/" ; echo "--> Default RVM gems installed"; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
while true; do
read -p "Add VIM app to GNOME like env menus? " yn
case $yn in
[Yy]* ) cp -R "`pwd`/extra/.local" "$HOME/" ; echo "--> VIM app is added to menus"; break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
echo "Done."
echo "Have a nice day!"
echo