diff --git a/0-setup-linux.sh b/0-setup-linux.sh index e265fe5..df8e9f4 100755 --- a/0-setup-linux.sh +++ b/0-setup-linux.sh @@ -2,19 +2,6 @@ # If debug is enabled, we remove '-e' dynamically inside the initialization so it doesn't instantly crash during debugging steps set -uo pipefail -#------------------------------------------ -# Debug Flag Initialization -#------------------------------------------ -export DEBUG_MODE=false -if [[ "${1:-}" == "-d" || "${1:-}" == "--debug" ]]; then - export DEBUG_MODE=true - echo "!!! DEBUG MODE ENABLED !!!" - echo "The script will pause after each major section." - echo -else - set -e # Enable immediate exit on error only if NOT debugging step-by-step -fi - #------------------------------------------ # Color helpers (printf-safe, no tput) #------------------------------------------ @@ -39,6 +26,19 @@ 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"; } +#------------------------------------------ +# Debug Flag Initialization +#------------------------------------------ +export DEBUG_MODE=false +if [[ "${1:-}" == "-d" || "${1:-}" == "--debug" ]]; then + export DEBUG_MODE=true + color_red "!!! DEBUG MODE ENABLED !!!" + color_red "The script will pause after each major section." + echo +else + set -e # Enable immediate exit on error only if NOT debugging step-by-step +fi + #------------------------------------------ # Debug Pause Helper #------------------------------------------