-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.base_install.sh
52 lines (37 loc) · 1.29 KB
/
.base_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
#!/bin/bash
logger() {
local GREEN="\033[1;32m"
local NC="\033[00m"
echo -e "${GREEN}Logger: $1 ${NC}"
}
basic_install() {
logger "Update system..."
sudo apt -y update
logger "Install basic utils..."
sudo apt install -q -y git wget curl openssl tar zip unzip file tree htop ssh gnupg build-essential bash-completion net-tools dpkg software-properties-common
# python-software-properties
}
set_local_bin_path() {
logger "Creating a local bin path (~/.local/bin) folder and adding it to the $PATH"
mkdir -p ~/.local/bin ~/.local/lib
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
logger "exported local bin path variable to ~/.bashrc"
}
configure_locale() {
logger "Configuring en_US.UTF-8 locale..."
sudo locale-gen en_US.UTF-8
# Add locale env variables to ~/.bashrc
echo 'export LANG="en_US.UTF-8"' >> ~/.bashrc
echo 'export LANGUAGE="en_US:en"' >> ~/.bashrc
echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc
logger "exported locale variables to ~/.bashrc"
}
# to do add time zone configure (set to UTC always)
# UTC it's a default time and should be by default on any server
# Modern XXI centry CLI text editor https://github.com/zyedidia/micro
# It should be on any linux server by default
main() {
basic_install
set_local_bin_path
configure_locale
}