forked from sudorook/debian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postinstall
executable file
·216 lines (198 loc) · 5.44 KB
/
postinstall
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#! /bin/bash
set -euo pipefail
# Debian (post-)install scripts
# Copyright (C) 2020
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
DIR="$(dirname "$0")"
#
# Source the functions
#
. "${DIR}"/functions/00-check
. "${DIR}"/functions/01-base
. "${DIR}"/functions/01-misc
. "${DIR}"/functions/02-desktop
. "${DIR}"/functions/03-network
. "${DIR}"/functions/03-packages
. "${DIR}"/functions/04-themes
. "${DIR}"/functions/05-personal
#
# Define main select wrapper
#
function main {
show_question "Select an option:"
show_info "Main (Hit ENTER to see options again.)"
local options=(
"Quit"
"Autopilot"
"Base"
"Miscellaneous"
"Desktop environment"
"Network tools"
"Applications"
"Themes"
"Personalization")
local option
select option in "${options[@]}"; do
case "${option}" in
"Quit")
show_success "I hope this was as fun for you as it was for me."
break
;;
"Autopilot")
local response
response=$(ask_question "Let this script install everything? (y/N)")
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
# Install base packages
# purge_packages
# update_packages
install_base
install_firmware
enable_contrib_repos
enable_nonfree_repos
enable_nonfree-firmware_repos
enable_sudo_insults
disable_beep
# Install miscellaneous extras
install_utils
# install_laptop
# install_plymouth
install_selinux
install_zsh
# Install a desktop environment
# install_gnome
# install_cinnamon
install_kde
# Set up network configuration
install_network
# install_discovery
install_firewall
# install_tor
# use_onion_repos
# Install useful packages
install_3d_accel
# install_android
# install_apps
install_apps_kde
install_codecs
install_containers
install_dev
# install_extra
install_extra_kde
# install_pipewire
# install_printing
# install_games
# install_kvm
# install_kvm_guest
install_messaging
# install_mingw
install_music
install_texlive
# install_torbrowser
# install_vim
# install_neovim
install_lazyvim
# install_virtualbox
# install_virtualbox_guest
# install_wine
# Install themes
# install_theme_deps_gtk
# install_theme_deps_kde
# install_arc_gtk
# install_arc_kde
# install_adapta_gtk
# install_plata_gtk
# install_materia_gtk
# install_materia_kde
install_fonts
# install_papirus_icons
# install_colorific_themes
install_nightfox_themes
# install_timed_backgrounds
install_plasma_timed_backgrounds
# set_qtcompat
# Add my personal settings
set_system_font
# set_icon_theme
# set_gtk_theme
set_plasma_theme
# set_lightdm_theme
# set_gdm_theme
set_sddm_theme
# set_dark_gtk
# set_bash_shell
set_zsh_shell
# import_cinnamon_dconf
# import_gnome_dconf
import_kde_settings
# import_apps_dconf
# import_terminal_dconf
enable_autologin
# invert_brightness
# enable_intel_iommu
# disable_pulseaudio_suspend
disable_11n
install_scripts
show_success "Everything installed."
fi
show_info "Main (Hit ENTER to see options again.)"
;;
"Base")
01-base
show_info "Main (Hit ENTER to see options again.)"
;;
"Miscellaneous")
01-misc
show_info "Main (Hit ENTER to see options again.)"
;;
"Desktop environment")
02-desktop
show_info "Main (Hit ENTER to see options again.)"
;;
"Network tools")
03-network
show_info "Main (Hit ENTER to see options again.)"
;;
"Applications")
03-packages
show_info "Main (Hit ENTER to see options again.)"
;;
"Themes")
04-themes
show_info "Main (Hit ENTER to see options again.)"
;;
"Personalization")
05-personal
show_info "Main (Hit ENTER to see options again.)"
;;
*)
show_warning "Invalid option."
;;
esac
done
}
#
# Check if dependencies are installed and if network is working
#
check_user
check_debian_release
check_network
install_sudo
check_sync_repos
install_post_dependencies
#
# GO!!!
#
main