v3-revamp-fedora
This commit is contained in:
+12
-31
@@ -1,37 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
#------------------------------------------
|
# Source parent definitions (adjust path if needed)
|
||||||
# Color helpers (printf-safe, no tput)
|
source "$(dirname "$0")/../main_script.sh"
|
||||||
#------------------------------------------
|
|
||||||
RED="\033[0;31m"
|
|
||||||
GREEN="\033[0;32m"
|
|
||||||
YELLOW="\033[0;33m"
|
|
||||||
CYAN="\033[0;36m"
|
|
||||||
GRAY="\033[0;37m"
|
|
||||||
BOLD="\033[1m"
|
|
||||||
RESET="\033[0m"
|
|
||||||
|
|
||||||
# Disable colors if output is not a terminal
|
|
||||||
if [ ! -t 1 ]; then
|
|
||||||
RED="" GREEN="" YELLOW="" CYAN="" GRAY="" BOLD="" RESET=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
color_yellow() { printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; }
|
|
||||||
color_cyan() { printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; }
|
|
||||||
color_red() { printf "%b%s%b\n" "$RED" "$*" "$RESET"; }
|
|
||||||
color_green() { printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; }
|
|
||||||
color_gray() { printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; }
|
|
||||||
|
|
||||||
#------------------------------------------
|
|
||||||
# Use exported variables from main detection script
|
|
||||||
#------------------------------------------
|
|
||||||
OS="${DETECTED_OS}"
|
|
||||||
DDE="${DETECTED_DE}"
|
|
||||||
DE="${SELECTED_DE}"
|
|
||||||
TWM="${SELECTED_TWM}"
|
|
||||||
INSTALL_LEVEL="${INSTALL_LEVEL}"
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
color_cyan "Starting Fedora setup..."
|
color_cyan "Starting Fedora setup..."
|
||||||
@@ -66,6 +37,8 @@ if ! command -v curl >/dev/null 2>&1; then
|
|||||||
install_packages curl
|
install_packages curl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pause_if_debug
|
||||||
|
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
# 1. Update and Enable Repos
|
# 1. Update and Enable Repos
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
@@ -112,6 +85,8 @@ color_gray "Updating the system"
|
|||||||
echo
|
echo
|
||||||
sudo dnf update -y
|
sudo dnf update -y
|
||||||
|
|
||||||
|
pause_if_debug
|
||||||
|
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
# 3. Detected OS / DE / TWM info
|
# 3. Detected OS / DE / TWM info
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
@@ -122,6 +97,8 @@ color_gray "Selected DE:" "$DE"
|
|||||||
color_gray "Selected TWM:" "$TWM"
|
color_gray "Selected TWM:" "$TWM"
|
||||||
color_gray "Installation Level:" "$INSTALL_LEVEL"
|
color_gray "Installation Level:" "$INSTALL_LEVEL"
|
||||||
|
|
||||||
|
pause_if_debug
|
||||||
|
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
# 4. Desktop Environment installation
|
# 4. Desktop Environment installation
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
@@ -142,6 +119,8 @@ case "$DE" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
pause_if_debug
|
||||||
|
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
# 5. Tiling Window Manager installation
|
# 5. Tiling Window Manager installation
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
@@ -162,6 +141,8 @@ case "$TWM" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
pause_if_debug
|
||||||
|
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
# 6. Installation level handling
|
# 6. Installation level handling
|
||||||
#------------------------------------------
|
#------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user