diff --git a/fedora/fedora.sh b/fedora/fedora.sh index cb0c583..19fbf74 100755 --- a/fedora/fedora.sh +++ b/fedora/fedora.sh @@ -1,37 +1,8 @@ #!/bin/bash set -euo pipefail -#------------------------------------------ -# Color helpers (printf-safe, no tput) -#------------------------------------------ -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)" +# Source parent definitions (adjust path if needed) +source "$(dirname "$0")/../main_script.sh" echo color_cyan "Starting Fedora setup..." @@ -66,6 +37,8 @@ if ! command -v curl >/dev/null 2>&1; then install_packages curl fi +pause_if_debug + #------------------------------------------ # 1. Update and Enable Repos #------------------------------------------ @@ -112,6 +85,8 @@ color_gray "Updating the system" echo sudo dnf update -y +pause_if_debug + #------------------------------------------ # 3. Detected OS / DE / TWM info #------------------------------------------ @@ -122,6 +97,8 @@ color_gray "Selected DE:" "$DE" color_gray "Selected TWM:" "$TWM" color_gray "Installation Level:" "$INSTALL_LEVEL" +pause_if_debug + #------------------------------------------ # 4. Desktop Environment installation #------------------------------------------ @@ -142,6 +119,8 @@ case "$DE" in ;; esac +pause_if_debug + #------------------------------------------ # 5. Tiling Window Manager installation #------------------------------------------ @@ -162,6 +141,8 @@ case "$TWM" in ;; esac +pause_if_debug + #------------------------------------------ # 6. Installation level handling #------------------------------------------