57 lines
1.6 KiB
Bash
Executable File
57 lines
1.6 KiB
Bash
Executable File
#!/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
|
|
|
|
say_red() { printf "\n"; printf "%b%s%b\n" "$RED" "$*" "$RESET"; }
|
|
say_green() { printf "\n"; printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; }
|
|
say_yellow() { printf "\n"; printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; }
|
|
say_cyan() { printf "\n"; printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; }
|
|
say_gray() { printf "\n"; printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; }
|
|
say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; }
|
|
|
|
##########################
|
|
# Use exported variables from main detection script
|
|
##########################
|
|
OS="${DETECTED_OS:-debian}"
|
|
DDE="${DETECTED_DE}"
|
|
DE="${SELECTED_DE:-none}"
|
|
TWM="${SELECTED_TWM:-none}"
|
|
INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}"
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
##########################
|
|
# Helper functions
|
|
##########################
|
|
install_packages() { sudo apt update; sudo apt install -y --no-install-recommends "$@"; }
|
|
is_package_installed() { dpkg -s "$1" &>/dev/null; }
|
|
|
|
say_yellow "Starting workstation setup..."
|
|
|
|
# Run full setup first
|
|
bash "$SCRIPT_DIR/debian-full.sh"
|
|
|
|
# Optionally add workstation-specific packages here
|
|
install_packages git vlc libreoffice
|
|
|
|
# End of script
|
|
say_green "Workstation setup completed."
|
|
|
|
# Pause
|
|
read -n 1 -s -r -p "Press any key to continue"
|
|
echo
|