-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.sh
76 lines (59 loc) · 1.76 KB
/
main.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
#!/bin/bash
#
# Author:
# Skyler Dong <[email protected]>
#
# Description:
# Script for installing essential programs on a freshly installed
# Ubuntu Desktop 20 (Focal Fossa)
#
# Repository:
# https://github.com/dongskyler/ubuntu-20-desktop-post-installation-script
#
# Copyright (c) 2020 Skyler Dong.
#
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
#
main() {
# Load functions from lib
for f in ./lib/*.sh; do
source "$f"
done
unset f
print_header "BEGINNING OF INSTALLATION SCRIPT."
# Configuring the system before installing programs
pre_install_config
# Uninstall programs
uninstall_programs
# Install programs
install_programs
# Add shell aliases
add_aliases
# Configure terminal profiles
print_header "Configuring terminal profiles..."
# First, create a dummy profile. For some reason,
# if we don't, the system cannot properly install profiles
printf "Create a dummy terminal profile 'Dummy'...\n"
create_new_terminal_profile Dummy
# Install terminal profile 'Earthsong'
printf "Installing terminal profile 'Earthsong'...\n"
printf "36\n" | bash -c "$(wget -qO- https://git.io/vQgMr)"
# Set profile 'Earthsong' as default
printf "Set 'Earthsong' as the default profile...\n"
set_default_terminal_profile Earthsong
# Delete dummy terminal profile 'Dummy'
delete_terminal_profile Dummy
# Set favoriate apps to dash
set_favorite_apps
# Configuring the system after installing programs
post_install_config
# Clean up
clean_up
# Mark the end of this script
print_header "ALL DONE. END OF INSTALLATION SCRIPT."
# Reboot the computer
reboot_countdown
}
main "$@" | tee -a "$HOME/.ubuntu_post_install.log"