-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·131 lines (113 loc) · 2.35 KB
/
install
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
#!/bin/bash
# Author Daniel Bäckman
# Exit if it breaks
# set -e
packages() {
{
sudo apt install -y tmux
sudo apt install -y tldr
sudo apt install -y vim
sudo apt install -y vifm
sudo apt install -y dircolors
sudo apt install -y openssh-server
sudo apt install -y newsboat
sudo apt install -y screenfetch
} 2>/dev/null
}
clone() {
{
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
git clone https://github.com/junegunn/vim-plug ~/.vim/autoload/
git clone https://github.com/vifm/vifm-colors ~/.config/vifm/colors
} 2>/dev/null
}
link() {
if ! [ -e $HOME/.config/newsboat ]
then
mkdir $HOME/.config/newsboat
elif ! [ -e $HOME/.config/vifm ]
then
mkdir $HOME/.config/vifm
elif ! [ -e $HOME/.ssh ]
then
mkdir $HOME/.ssh
elif ! [ -e $HOME/.tmux ]
then
mkdir $HOME/.tmux
elif ! [ -e $HOME/.vim ]
then
mkdir $HOME/.vim
fi
{
ln -s $HOME/dotfiles/newsboat-config $HOME/.config/newsboat/config
ln -s $HOME/dotfiles/newsboat-urls $HOME/.config/newsboat/urls
ln -s $HOME/dotfiles/.tmux.conf $HOME/$filename
ln -s $HOME/dotfiles/.tmuxline $HOME/$filename
ln -s $HOME/dotfiles/.vimrc $HOME/$filename
ln -s $HOME/dotfiles/vifmrc $HOME/.config/vifm/$filename
ln -s $HOME/dotfiles/.vim-template.html $HOME/.vim/$filename
ln -s $HOME/dotfiles/.vim-template.bash $HOME/.vim/$filename
rm $HOME/.bashrc
ln -s $HOME/dotfiles/.bashrc $HOME/$filename
} 2>/dev/null
}
vimplug() {
echo -ne '\n' | vim +PluginInstall +qall 2>/dev/null
}
tmuxplug() {
./.tmux/plugins/tpm/scripts/install_plugins.sh 2>/dev/null
}
colors() {
dircolors -p > ~/.dircolors
sed -i 's/DIR\ 01\;34/DIR\ 01\;33/' .dircolors
}
update() {
sudo apt update
sudo apt dist-upgrade -yy
sudo apt autoremove -yy
}
leave() {
exit
}
everything() {
update
packages
clone
link
vimplug
tmuxplug
colors
leave
}
begin() {
# Main menu
cat << _EOF_
Welcome to Fauen's install script!
What would you like to do?
Press the number of your choice:
1. Update
2. Install packages
3. Clone repositories
4. Link the config files
5. Install tmux plugins
6. Install vim plugins
7. Colors
8. Everything
0. Exit
_EOF_
read -n 1 -s choice;
case $choice in
1) update;;
2) packages;;
3) clone;;
4) link;;
5) tmuxplug;;
6) vimplug;;
7) colors;;
8) everything;;
0) leave;;
*) echo "Not a valid choice, please try again...";sleep 2;clear;begin;;
esac
}
clear
begin