-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap-ubuntu
executable file
·49 lines (37 loc) · 944 Bytes
/
bootstrap-ubuntu
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
#!/bin/bash
function get_lsb_version() {
unset IFS
local _ver=(`lsb_release -rs`)
echo ${_ver}
}
function get_lsb_version_major() {
unset IFS
local _ver=$(`lsb_release -rs`)
IFS='.'; local _arr=($_ver)
echo ${_arr[0]}
}
function get_lsb_version_minor() {
unset IFS
local _ver=$(`lsb_release -rs`)
IFS="."; local _arr=($_ver)
echo ${_arr[1]}
}
function get_lsb_codename() {
unset IFS
local _codename=(`lsb_release -cs`)
echo $_codename
}
set -e
echo "export TERM=xterm-256color" >> ~/.bashrc
sudo sed 's/us.archive.ubuntu.com/mirror.kakao.com/' -i /etc/apt/sources.list
sudo apt update
pkglist_fn="pkglist-$(get_lsb_codename)"
if [ ! -f ./${pkglist_fn} ]; then
echo "error: can not find the pkglist file."
exit -1
fi
source ./${pkglist_fn}
sudo apt-get install -y ${pkgs_to_install[@]}
source ./git-bootstrap.sh
source ./emacs-bootstrap.sh
source ./global-bootstrap.sh