-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·114 lines (96 loc) · 3.39 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
#!/bin/bash
####################################################################
####################################################################
# This script will install/configure everything needed to setup my #
# Workstation on Ubuntu 20.04 LTS. #
####################################################################
####################################################################
#Create the glorious tmp dir that I throw everything in.
mkdir ~/tmp/
CO='\033[0m'
CY='\033[1;33m'
echo -e "$CY Install all of my packages needed for stuff $CO"
sudo apt-get update
sudo apt-get upgrade -yqq
sudo apt-get install -yqq \
apt-transport-https \
build-essential \
ca-certificates \
curl \
git \
gnupg-agent \
i3 \
i3lock-fancy \
openvpn \
software-properties-common \
vim \
xautolock
# Begin installing docker. This is a must.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# Set default editor to vim
sudo ln -sf /usr/bin/vim.basic /etc/alternatives/editor
sudo apt-get update -qq
sudo apt-get install -yqq docker-ce
# Update user groups to include docker
MYUSER=$USER
sudo usermod -a -G docker $MYUSER
# Begin installing docker-compose
curl -L https://github.com/docker/compose/releases/download/1.25.5/docker-compose-`uname -s`-`uname -m` -o ~/tmp/docker-compose && \
sudo cp ~/tmp/docker-compose /usr/local/bin/docker-compose \
&& sudo chmod +x /usr/local/bin/docker-compose
# Install load script
echo -e "$CY Installing Load script $CO"
sudo cp ~/linux_tools/load /usr/local/bin/load \
&& sudo chown root: /usr/local/bin/load \
&& sudo chmod 755 /usr/local/bin/load \
&& echo "Success" || echo "failed";
# Install AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
rm -rf ./aws awscliv2.zip
# Install kubectl
curl -LO https://dl.k8s.io/release/v1.23.6/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/kubectl
# Install symlink settings
echo -e "$CY Creating some symlinks $CO"
# Symlink xresources
echo -e "\e[31 Creating symlink for .Xresources \e[0m";
rm -f ~/.Xresources;
ln -s ~/linux_tools/.Xresources ~/.Xresources;
sudo chown $MYUSER: ~/.Xresources;
stat ~/.Xresources \
&& echo "Symlink for Xresources success" || echo "Symlink for Xresources has failed"
# Symlink i3config.
echo -e "$CY Creating symlink to i3 config $CO"
mkdir ~/.i3;
ln -s ~/linux_tools/config ~/.i3/config;
sudo chown $MYUSER: ~/.i3 ~/.i3/config;
stat ~/.i3 \
&& echo ".i3 directory exists" \
&& stat ~/.i3/config \
&& echo ".i3 config symlink is created" \
|| echo "Something went terribly wrong"
# Symlink for vimrc
echo -e "$CY Creating Symlink for vimrc $CO"
ln -s ~/linux_tools/.vimrc ~/.vimrc;
sudo chown $MYUSER: ~/.vimrc;
stat ~/.vimrc && echo "Vimrc Symlink has been created"\
|| echo "Vimrc symlink failed"
# Install crontab
echo -e "$CY Installing user provided crontab $CO"
crontab crontab && echo "Succesfully installed crontab!" \
|| echo "Crontab install failed."
# Symlink for bashrc
echo -e "$CY Creating Symlink for bashrc $CO"
rm -f ~/.bashrc;
ln -s ~/linux_tools/.bashrc ~/.bashrc;
sudo chown $MYUSER: ~/.bashrc;
stat ~/.bashrc \
&& echo "Bashrc Symlink has been created" \
|| echo "Bashrc symlink failed."