-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathubuntu.sh
More file actions
executable file
·76 lines (63 loc) · 1.94 KB
/
ubuntu.sh
File metadata and controls
executable file
·76 lines (63 loc) · 1.94 KB
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
#!/bin/bash
install_system_deps() {
echo " - vim (vim-gtk3)"
sudo apt-get update
sudo apt-get install -y software-properties-common dconf-cli uuid-runtime
sudo apt-get install -y rsync \
silversearcher-ag \
git \
xclip \
build-essential \
zsh \
vim-gtk3 \
libevent-dev \
ncurses-dev \
bison \
pkg-config \
libssl-dev \
libreadline-dev \
zlib1g-dev \
libyaml-dev \
libffi-dev
}
install_tmux() {
TMUX_VERSION="${TMUX_VERSION:-3.6a}"
TMUX_SOURCE_FILE="tmux-${TMUX_VERSION}.tar.gz"
TMUX_SOURCE_FOLDER="tmux-${TMUX_VERSION}"
echo "Installing tmux ${TMUX_VERSION}"
curl -LO "https://github.com/tmux/tmux/releases/download/${TMUX_VERSION}/${TMUX_SOURCE_FILE}"
tar -xf "${TMUX_SOURCE_FILE}"
pushd "$TMUX_SOURCE_FOLDER"
./configure
make
sudo make install
popd
rm -rf "$TMUX_SOURCE_FOLDER"
rm "$TMUX_SOURCE_FILE"
}
install_gnome_terminal_colors() {
if [[ -z "${TERMINAL}" ]]; then
TERMINAL=gnome-terminal bash -c "$(curl -sSLo- https://raw.githubusercontent.com/Mayccoll/Gogh/master/gogh.sh)"
else
bash -c "$(curl -sSLo- https://raw.githubusercontent.com/Mayccoll/Gogh/master/gogh.sh)"
fi
}
install_docker() {
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo usermod -aG docker "$(whoami)"
}
install_system_deps
install_tmux
if [ -z "${CI:-}" ]; then
install_gnome_terminal_colors
fi
if [ "${SKIP_DOCKER:-}" != "1" ]; then
install_docker
fi
sudo apt-get autoremove -y