-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·73 lines (51 loc) · 1.88 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
#!/bin/bash
cd
function root_install {
apt-get update
apt-get install -y \
curl \
vim \
screen \
htop \
ntp \
git \
# Docker
apt-get install -y \
apt-transport-https \
ca-certificates \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get install -y docker-ce
groupadd dockers
gpasswd -a olivier docker
service docker restart
}
function curl_dotfiles {
curl \
-O https://raw.githubusercontent.com/olivierperez/dotfiles/master/files/.aliases.docker \
-O https://raw.githubusercontent.com/olivierperez/dotfiles/master/files/.aliases.global \
-O https://raw.githubusercontent.com/olivierperez/dotfiles/master/files/.bashps1 \
-O https://raw.githubusercontent.com/olivierperez/dotfiles/master/files/.gitconfig \
-O https://raw.githubusercontent.com/olivierperez/dotfiles/master/files/.screenrc \
-O https://raw.githubusercontent.com/olivierperez/dotfiles/master/files/.vimrc
echo ". ~/.aliases.global" >> ~/.bashrc
echo ". ~/.aliases.docker" >> ~/.bashrc
}
cd
if [ "$(id -u)" != "0" ]; then
echo "------------------------------------------"
echo "You need to be root to do the full install"
echo "------------------------------------------"
curl_dotfiles
else
echo "------------------"
echo "Installing as root"
echo "------------------"
root_install
curl_dotfiles
fi
echo "---------------------"
echo "Installation finished"
echo "---------------------"