-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·51 lines (40 loc) · 1.35 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
#!/usr/bin/env bash
source "${HOME}"/.dotfilesrc
source "${DOTFILES_DIR}"/lib/dotfiles.sh
install () {
# Install prerequisites
source "${DOTFILES_DIR}"/install/prereq.sh
# Stow configs
source "${DOTFILES_DIR}"/configs/stow.sh
source "$DOTFILES_DIR"/install/cli.sh
if [ "${DOTFILES_INSTALL_GUI^^}" = "TRUE" ]; then
source "$DOTFILES_DIR"/install/apps.sh
source "$DOTFILES_DIR"/install/desktop-entries.sh
else
echo "Skipping GUI apps installation."
fi
# Run setups
for installer in "${DOTFILES_DIR}"/setups/*.sh; do source $installer; done
echo "You're all set! You should now reboot the system."
}
# [[ Entry Point ]]
if tput colors >/dev/null 2>&1 && [[ $(tput colors) -gt 0 ]]; then
echo -e "\033[0;31m!!!!!!!!!!!!!!!!!!!!!!!!!!!\033[0m"
echo -e "\033[0;31m!!!!!!!!! WARNING !!!!!!!!!\033[0m"
echo -e "\033[0;31m!!!!!!!!!!!!!!!!!!!!!!!!!!!\033[0m"
else
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "!!!!!!!!! WARNING !!!!!!!!!"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi
echo -e "This script is designed to set up a fresh system and may overwrite existing files."
echo -e "Are you sure you want to proceed?"
echo -n "Do you want to proceed? (y/N): "
read -r answer
# convert answer to lowercase
answer=$(echo "$answer" | tr '[:upper:]' '[:lower:]')
if [ "$answer" = "y" ] || [ "$answer" = "yes" ]; then
install
else
echo "Exiting..."
fi