From f502cecaabeab0f2dd17aaf4bdd4d776a791b761 Mon Sep 17 00:00:00 2001 From: "[yuri]" <[yuri.kuit@gmail.com]> Date: Mon, 10 Nov 2025 11:23:02 +0100 Subject: [PATCH] updated debian files --- v2/debian-chadwm.sh | 40 +++- v2/debian-full.sh | 75 ++++--- v2/debian-gnome.sh | 136 ++++++------- v2/debian-hyprland.sh | 40 +++- v2/debian-minimal.sh | 422 +++++++++++++++------------------------ v2/debian-plasma.sh | 143 +++++++------ v2/debian-server.sh | 40 +++- v2/debian-workstation.sh | 40 +++- v2/debian-xfce.sh | 64 +++--- v2/debian.sh | 186 ++++++++--------- 10 files changed, 598 insertions(+), 588 deletions(-) diff --git a/v2/debian-chadwm.sh b/v2/debian-chadwm.sh index 9457646..db789ca 100755 --- a/v2/debian-chadwm.sh +++ b/v2/debian-chadwm.sh @@ -2,17 +2,27 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_cyan() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -23,5 +33,13 @@ DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" +color_cyan +echo +echo "Starting Debian Chadwm setup..." +color_reset +echo "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" +echo + # Pause -read -n 1 -s -r -p "Press any key to continue" \ No newline at end of file +read -n 1 -s -r -p "Press any key to continue" +echo diff --git a/v2/debian-full.sh b/v2/debian-full.sh index 4a4ab10..7d0cd26 100755 --- a/v2/debian-full.sh +++ b/v2/debian-full.sh @@ -2,17 +2,26 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_cyan() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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' + +if [ ! -t 1 ]; then + RED='' GREEN='' YELLOW='' CYAN='' GRAY='' BOLD='' RESET='' +fi + +color_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -23,25 +32,37 @@ DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" -# Pause +# Pause before continuing read -n 1 -s -r -p "Press any key to continue" -# Before running FULL first run Minimal +color_cyan +echo +echo "Running Debian Minimal setup first..." +color_reset + +# Run the minimal setup bash debian-minimal.sh -# Now continue with FULL - # install tools - sudo apt install -y \ - arandr \ - catfish \ - galculator \ - network-manager \ - network-manager-applet \ - network-manager-openvpn \ - numlockx \ - pavucontrol \ - playerctl \ - xcolors \ - gparted +color_yellow +echo +echo "Continuing with Debian FULL installation..." +color_reset - \ No newline at end of file +# Install additional FULL packages +sudo apt install -y \ + arandr \ + catfish \ + galculator \ + network-manager \ + network-manager-applet \ + network-manager-openvpn \ + numlockx \ + pavucontrol \ + playerctl \ + xcolors \ + gparted + +color_green +echo +echo "Debian FULL installation packages installed." +color_reset diff --git a/v2/debian-gnome.sh b/v2/debian-gnome.sh index 31cfca5..d70e712 100755 --- a/v2/debian-gnome.sh +++ b/v2/debian-gnome.sh @@ -2,17 +2,26 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_blue() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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' + +if [ ! -t 1 ]; then + RED='' GREEN='' YELLOW='' CYAN='' GRAY='' BOLD='' RESET='' +fi + +color_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -24,31 +33,30 @@ TWM="${SELECTED_TWM:-none}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" ########################## -# 4. Desktop Environment installation +# Desktop Environment installation ########################## -tput_yellow +color_yellow echo "Installing Gnome..." -tput_reset +color_reset -#detect if Gnome and SDDM are installed and if not install them if [[ -z "$DDE" ]]; then - tput_cyan + color_cyan echo echo "No Desktop Environment detected. Installing Gnome (light setup with SDDM)..." - tput_reset + color_reset sudo apt update sudo apt install -y --no-install-recommends sddm \ - gnome-shell \ - gnome-terminal \ - nautilus \ - gnome-control-center \ - gnome-system-monitor \ - gnome-settings-daemon \ - gnome-tweaks \ - network-manager-gnome \ - gnome-keyring \ - gnome-session + gnome-shell \ + gnome-terminal \ + nautilus \ + gnome-control-center \ + gnome-system-monitor \ + gnome-settings-daemon \ + gnome-tweaks \ + network-manager-gnome \ + gnome-keyring \ + gnome-session # Enable SDDM as the display manager sudo systemctl enable sddm @@ -56,23 +64,22 @@ if [[ -z "$DDE" ]]; then # Enable graphical target sudo systemctl set-default graphical.target - tput_green + color_green echo echo "Gnome with SDDM installed successfully." echo "You can reboot now to start Gnome." - tput_reset + color_reset else - tput_cyan + color_cyan echo echo "You already have $DE installed." - tput_reset + color_reset - # Check if LightDM is installed and active if systemctl is-active --quiet lightdm; then - tput_yellow + color_yellow echo echo "LightDM is currently active. Replacing with SDDM..." - tput_reset + color_reset # Disable and remove LightDM sudo systemctl disable lightdm @@ -85,51 +92,44 @@ else # Enable graphical target sudo systemctl set-default graphical.target - tput_green + color_green echo echo "LightDM removed and replaced with SDDM." - tput_reset + color_reset else - tput_cyan + color_cyan echo echo "No LightDM detected, leaving current display manager unchanged." - tput_reset + color_reset fi fi -#cleanup unwanted packages - # Packages to remove - #packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole") - #sudo apt-mark manual xfce4-goodies - - # Function to check if a package is installed - is_package_installed() { - dpkg -s "$1" &> /dev/null - } +########################## +# Cleanup unwanted packages +########################## +# packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole") +is_package_installed() { dpkg -s "$1" &> /dev/null; } - # Iterate over each package - for package in "${packages[@]}"; do - if is_package_installed "$package"; then - echo "Removing $package..." - sudo apt-get purge -y "$package" - else - echo "$package is not installed, skipping." - fi +for package in "${packages[@]:-}"; do + if is_package_installed "$package"; then + echo "Removing $package..." + sudo apt-get purge -y "$package" + else + echo "$package is not installed, skipping." + fi - # Optional double-check - if ! is_package_installed "$package"; then - echo "$package successfully removed." - else - echo "$package is still installed. Check manually." - fi + if ! is_package_installed "$package"; then + echo "$package successfully removed." + else + echo "$package is still installed. Check manually." + fi - echo "----------------------------" - done + echo "----------------------------" +done - # Resolving network issues - sudo mv /etc/network/interfaces /etc/network/interfaces.bak - sudo systemctl restart NetworkManager - - # Remove leftover dependencies - sudo apt-get autoremove -y +# Resolving network issues +sudo mv /etc/network/interfaces /etc/network/interfaces.bak || true +sudo systemctl restart NetworkManager +# Remove leftover dependencies +sudo apt-get autoremove -y diff --git a/v2/debian-hyprland.sh b/v2/debian-hyprland.sh index 9457646..83d0e24 100755 --- a/v2/debian-hyprland.sh +++ b/v2/debian-hyprland.sh @@ -2,17 +2,27 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_cyan() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -23,5 +33,13 @@ DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" +color_cyan +echo +echo "Starting Debian Hyprland setup..." +color_reset +echo "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" +echo + # Pause -read -n 1 -s -r -p "Press any key to continue" \ No newline at end of file +read -n 1 -s -r -p "Press any key to continue" +echo diff --git a/v2/debian-minimal.sh b/v2/debian-minimal.sh index 52eaae3..5ad3282 100755 --- a/v2/debian-minimal.sh +++ b/v2/debian-minimal.sh @@ -2,17 +2,27 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_cyan() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -26,33 +36,152 @@ INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" # Pause read -n 1 -s -r -p "Press any key to continue" -# on all DE - ################################################################# - # Create directories (skel + user) - ################################################################# - echo - tput setaf 2 - echo "########################################################################" - echo "################### Creating directories" - echo "########################################################################" - tput sgr0 - echo +########################## +# Create directories (skel + user) +########################## +echo +color_green +echo "########################################################################" +echo "################### Creating directories" +echo "########################################################################" +color_reset +echo +sudo mkdir -p /etc/skel/.config/xfce4/{panel,xfconf} +mkdir -p \ + "$HOME"/{.bin,.fonts,.icons,.themes,DATA} \ + "$HOME/.local/share/"{icons,themes,applications} \ + "$HOME/.config/"{autostart,gtk-{3.0,4.0},variety,fish,neofetch} + +########################## +# Remove unwanted packages +########################## +packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole") + +is_package_installed() { + dpkg -s "$1" &> /dev/null +} + +for package in "${packages[@]}"; do + if is_package_installed "$package"; then + echo "Removing $package..." + sudo apt-get purge -y "$package" + else + echo "$package is not installed, skipping." + fi + + if ! is_package_installed "$package"; then + echo "$package successfully removed." + else + echo "$package is still installed. Check manually." + fi + + echo "----------------------------" +done + +sudo apt-get autoremove -y + +########################## +# Install needed packages +########################## +# Firmware / headers +sudo apt-get install -y dkms linux-headers-$(uname -r) + +# Archive managers +sudo apt install -y zip gzip p7zip unace unrar unzip file-roller + +# Fonts +sudo apt install -y font-manager fonts-noto fonts-dejavu fonts-droid-fallback \ + fonts-hack fonts-inconsolata fonts-liberation fonts-roboto fonts-ubuntu fonts-terminus + +# RobotoMono Nerd Font +FONT_DIR="$HOME/.local/share/fonts" +mkdir -p "$FONT_DIR" +ZIP_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/RobotoMono.zip" +TMP_DIR="$(mktemp -d)" +echo "Downloading RobotoMono Nerd Font..." +curl -L "$ZIP_URL" -o "$TMP_DIR/RobotoMono.zip" +echo "Extracting..." +unzip -q "$TMP_DIR/RobotoMono.zip" -d "$FONT_DIR" +rm -rf "$TMP_DIR" +echo "Updating font cache..." +fc-cache -fv +echo "RobotoMono Nerd Font installed successfully in $FONT_DIR" + +# Tools +sudo apt install -y wget curl nano fastfetch lolcat bash-completion starship alacritty \ + hwinfo lshw libpam0g libpam-modules libpam-runtime libpam-modules-bin \ + avahi-daemon avahi-utils libnss-mdns man-db manpages tree xdg-user-dirs \ + mate-polkit rsync time bat chrony duf + +# Theming +sudo apt install -y bibata-cursor-theme feh arc-theme + +# Surfn icon theme +echo "Installing Surfn icon theme..." +TEMP_DIR=$(mktemp -d) +git clone https://github.com/erikdubois/Surfn.git "$TEMP_DIR/surfn" +cp -r "$TEMP_DIR/surfn/surfn-icons/" ~/.icons/ +rm -rf "$TEMP_DIR" +echo "Surfn icon theme installed." + +# Flat Remix Dark GTK theme +echo "Installing Flat Remix Dark GTK theme..." +TEMP_DIR=$(mktemp -d) +cd "$TEMP_DIR" +wget -O flat-remix-gtk.tar.gz https://github.com/daniruiz/flat-remix-gtk/archive/refs/heads/master.tar.gz +tar -xzf flat-remix-gtk.tar.gz +mv flat-remix-gtk-master/themes/* ~/.themes/ +cd ~ +rm -rf "$TEMP_DIR" +echo "Flat Remix Dark GTK theme installed." + +# Internet +sudo apt install -y chromium + +# Enable services +sudo systemctl enable avahi-daemon.service +sudo systemctl enable chrony +sudo systemctl enable fstrim.timer + +########################## +# Detect virtualization platform +########################## +echo "Detecting virtualization platform..." +virt_type=$(systemd-detect-virt) + +case "$virt_type" in + kvm) + echo "Detected KVM. Installing qemu-guest-agent..." + sudo apt install -y qemu-guest-agent spice-vdagent + sudo systemctl enable qemu-guest-agent.service + ;; + oracle) + echo "Detected VirtualBox. Installing virtualbox-guest-utils..." + sudo apt install -y virtualbox-guest-utils + sudo systemctl enable vboxservice.service + ;; + none) + echo "No virtualization detected. Skipping guest utilities." + ;; + *) + echo "Virtualization detected: $virt_type, but no install routine defined." + ;; +esac + +########################## +# XFCE-specific setup +########################## +if [[ "$DE" == "xfce" ]]; then + echo "Setting up XFCE directories..." sudo mkdir -p /etc/skel/.config/xfce4/{panel,xfconf} - mkdir -p \ - "$HOME"/{.bin,.fonts,.icons,.themes,DATA} \ - "$HOME/.local/share/"{icons,themes,applications} \ - "$HOME/.config/"{autostart,gtk-{3.0,4.0},variety,fish,neofetch} + mkdir -p "$HOME/.config/"{xfce4,xfce4/xfconf} - # Packages to remove - packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole") - - # Function to check if a package is installed - is_package_installed() { - dpkg -s "$1" &> /dev/null - } + # Cleanup unwanted packages + echo "Removing unwanted packages from XFCE..." + packages=("xfburn" "xfce4-screenshooter" "xfce4-notes") + sudo apt-mark manual xfce4-goodies - # Iterate over each package for package in "${packages[@]}"; do if is_package_installed "$package"; then echo "Removing $package..." @@ -61,7 +190,6 @@ read -n 1 -s -r -p "Press any key to continue" echo "$package is not installed, skipping." fi - # Optional double-check if ! is_package_installed "$package"; then echo "$package successfully removed." else @@ -71,228 +199,8 @@ read -n 1 -s -r -p "Press any key to continue" echo "----------------------------" done - # Remove leftover dependencies sudo apt-get autoremove -y - # install needed packages - #firmwares - sudo apt-get install -y \ - dkms \ - linux-headers-$(uname -r) - - #archive-managers - sudo apt install -y zip gzip p7zip unace unrar unzip - - #fonts - sudo apt install -y \ - font-manager \ - fonts-noto \ - fonts-dejavu \ - fonts-droid-fallback \ - fonts-hack \ - fonts-inconsolata \ - fonts-liberation \ - fonts-roboto \ - fonts-ubuntu \ - fonts-terminus - - # Install RobotoMono Nerd Font - # Destination directory - FONT_DIR="$HOME/.local/share/fonts" - mkdir -p "$FONT_DIR" - - # Download RobotoMono Nerd Font (latest release) - ZIP_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/RobotoMono.zip" - TMP_DIR="$(mktemp -d)" - - echo "Downloading RobotoMono Nerd Font..." - curl -L "$ZIP_URL" -o "$TMP_DIR/RobotoMono.zip" - - echo "Extracting..." - unzip -q "$TMP_DIR/RobotoMono.zip" -d "$FONT_DIR" - - echo "Cleaning up..." - rm -rf "$TMP_DIR" - - echo "Updating font cache..." - fc-cache -fv - - echo "RobotoMono Nerd Font installed successfully in $FONT_DIR" - - #tools - sudo apt install -y \ - wget \ - curl \ - nano \ - fastfetch \ - lolcat \ - bash-completion \ - starship \ - alacritty \ - hwinfo \ - lshw \ - libpam0g \ - libpam-modules \ - libpam-runtime \ - libpam-modules-bin \ - avahi-daemon \ - avahi-utils \ - libnss-mdns - - if [ ! -f /usr/bin/duf ]; then - sudo apt install -y duf - fi - sudo apt install -y \ - man-db \ - manpages \ - tree \ - xdg-user-dirs \ - mate-polkit \ - rsync \ - time \ - bat \ - chrony - - #theming - sudo apt install -y \ - bibata-cursor-theme \ - feh \ - arc-theme - - echo "Installing Surfn icon theme..." - # Clone Surfn repo - TEMP_DIR=$(mktemp -d) - git clone https://github.com/erikdubois/Surfn.git "$TEMP_DIR/surfn" - cd "$TEMP_DIR/surfn" - # Copy the icon theme to the user's local icons directory - cp -r surfn-icons/* ~/.icons/ - cd ~ - rm -rf "$TEMP_DIR" - echo "Surfn icon theme installed." - - echo "Installing Flat Remix Dark GTK theme..." - TEMP_DIR=$(mktemp -d) - cd "$TEMP_DIR" - # Download latest master as tar.gz - wget -O flat-remix-gtk.tar.gz https://github.com/daniruiz/flat-remix-gtk/archive/refs/heads/master.tar.gz - # Extract - tar -xzf flat-remix-gtk.tar.gz - # Move the Dark GTK theme to ~/.themes - # The actual theme folder is "Flat-Remix-Dark" inside the extracted directory - mv flat-remix-gtk-master/themes/* ~/.themes/ - cd ~ - rm -rf "$TEMP_DIR" - echo "Flat Remix Dark GTK theme installed." - - #internet - sudo apt install -y \ - chromium - - #enable services - sudo systemctl enable avahi-daemon.service - sudo systemctl enable chrony - - #Run service that will discard unused blocks on mounted filesystems. This is useful for solid-state drives (SSDs) and thinly-provisioned storage. - echo - echo "Enable fstrim timer" - sudo systemctl enable fstrim.timer - - echo - tput setaf 3 - echo "########################################################################" - echo "Detecting virtualization platform..." - echo "########################################################################" - tput sgr0 - echo - - virt_type=$(systemd-detect-virt) - - case "$virt_type" in - kvm) - echo "Detected KVM. Installing qemu-guest-agent..." - sudo apt install -y qemu-guest-agent spice-vdagent - sudo systemctl enable qemu-guest-agent.service - ;; - oracle) - echo "Detected VirtualBox. Installing virtualbox-guest-utils..." - sudo apt install -y virtualbox-guest-utils - sudo systemctl enable vboxservice.service - ;; - none) - echo "No virtualization detected. Skipping guest utilities." - ;; - *) - echo "Virtualization detected: $virt_type, but no install routine defined." - ;; - esac - -# if on XFCE -case "$DE" in - xfce) - ################################################################# - # Create directories (skel + user) - ################################################################# - echo - tput setaf 2 - echo "########################################################################" - echo "################### Creating directories" - echo "########################################################################" - tput sgr0 - echo - - sudo mkdir -p /etc/skel/.config/xfce4/{panel,xfconf} - mkdir -p \ - "$HOME/.config/"{xfce4,xfce4/xfconf} - - # cleanup unwanted packages - tput_yellow - echo - echo "Removing unwanted packages from $DE..." - tput_reset - - # Packages to remove - packages=("xfburn" "xfce4-screenshooter" "xfce4-notes") - sudo apt-mark manual xfce4-goodies - - # Function to check if a package is installed - is_package_installed() { - dpkg -s "$1" &> /dev/null - } - - # Iterate over each package - for package in "${packages[@]}"; do - if is_package_installed "$package"; then - echo "Removing $package..." - sudo apt-get purge -y "$package" - else - echo "$package is not installed, skipping." - fi - - # Optional double-check - if ! is_package_installed "$package"; then - echo "$package successfully removed." - else - echo "$package is still installed. Check manually." - fi - - echo "----------------------------" - done - - # Remove leftover dependencies - sudo apt-get autoremove -y - - # install needed packages - #tools - sudo apt install -y thunar thunar-archive-plugin thunar-volman - - #archive-managers - sudo apt install -y file-roller - - - ;; -esac - - - - - + # Install XFCE tools + sudo apt install -y thunar thunar-archive-plugin thunar-volman +fi diff --git a/v2/debian-plasma.sh b/v2/debian-plasma.sh index b3b25fc..f33d58e 100755 --- a/v2/debian-plasma.sh +++ b/v2/debian-plasma.sh @@ -2,17 +2,27 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_blue() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -26,60 +36,49 @@ INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" ########################## # 4. Desktop Environment installation ########################## -tput_yellow +color_yellow echo "Installing KDE Plasma..." -tput_reset +color_reset -#detect if KDE Plasma and SDDM are installed and if not install them +# Detect if KDE Plasma and SDDM are installed and install if needed if [[ -z "$DDE" ]]; then - tput_cyan + color_cyan echo echo "No Desktop Environment detected. Installing KDE Plasma (light setup with SDDM)..." - tput_reset + color_reset sudo apt update sudo apt install -y --no-install-recommends sddm \ - plasma-desktop \ - dolphin \ - konsole \ - kate \ - plasma-nm \ - plasma-workspace \ - kde-config-gtk-style \ - kde-config-sddm \ - plasma-discover \ - plasma-discover-common \ - plasma-discover-backend-snap \ - plasma-discover-backend-flatpak \ - plasma-discover-backend-fwupd \ - kscreen + plasma-desktop dolphin konsole kate \ + plasma-nm plasma-workspace kde-config-gtk-style \ + kde-config-sddm plasma-discover plasma-discover-common \ + plasma-discover-backend-snap plasma-discover-backend-flatpak \ + plasma-discover-backend-fwupd kscreen # Enable SDDM as the display manager sudo systemctl enable sddm - - # Enable graphical target sudo systemctl set-default graphical.target # Rebuild Discover cache kbuildsycoca6 - tput_green + color_green echo echo "KDE Plasma with SDDM installed successfully." echo "You can reboot now to start KDE Plasma." - tput_reset + color_reset else - tput_cyan + color_cyan echo echo "You already have $DE installed." - tput_reset + color_reset # Check if LightDM is installed and active if systemctl is-active --quiet lightdm; then - tput_yellow + color_yellow echo echo "LightDM is currently active. Replacing with SDDM..." - tput_reset + color_reset # Disable and remove LightDM sudo systemctl disable lightdm @@ -88,55 +87,53 @@ else # Install and enable SDDM sudo apt install -y sddm sudo systemctl enable sddm - - # Enable graphical target sudo systemctl set-default graphical.target - tput_green + color_green echo echo "LightDM removed and replaced with SDDM." - tput_reset + color_reset else - tput_cyan + color_cyan echo echo "No LightDM detected, leaving current display manager unchanged." - tput_reset + color_reset fi fi -#cleanup unwanted packages - # Packages to remove - #packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole") - #sudo apt-mark manual xfce4-goodies - - # Function to check if a package is installed - is_package_installed() { - dpkg -s "$1" &> /dev/null - } +########################## +# Cleanup unwanted packages +########################## +# Define packages to remove (example) +packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole") - # Iterate over each package - for package in "${packages[@]}"; do - if is_package_installed "$package"; then - echo "Removing $package..." - sudo apt-get purge -y "$package" - else - echo "$package is not installed, skipping." - fi +is_package_installed() { + dpkg -s "$1" &> /dev/null +} - # Optional double-check - if ! is_package_installed "$package"; then - echo "$package successfully removed." - else - echo "$package is still installed. Check manually." - fi +for package in "${packages[@]}"; do + if is_package_installed "$package"; then + echo "Removing $package..." + sudo apt-get purge -y "$package" + else + echo "$package is not installed, skipping." + fi - echo "----------------------------" - done + # Optional double-check + if ! is_package_installed "$package"; then + echo "$package successfully removed." + else + echo "$package is still installed. Check manually." + fi - # Resolving network issues - sudo mv /etc/network/interfaces /etc/network/interfaces.bak - sudo systemctl restart NetworkManager + echo "----------------------------" +done - # Remove leftover dependencies - sudo apt-get autoremove -y +########################## +# Network cleanup +########################## +sudo mv /etc/network/interfaces /etc/network/interfaces.bak +sudo systemctl restart NetworkManager +# Remove leftover dependencies +sudo apt-get autoremove -y diff --git a/v2/debian-server.sh b/v2/debian-server.sh index 9457646..68b997f 100755 --- a/v2/debian-server.sh +++ b/v2/debian-server.sh @@ -2,17 +2,27 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_cyan() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -23,5 +33,13 @@ DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" +color_cyan +echo +echo "Starting Debian Server setup..." +color_reset +echo "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" +echo + # Pause -read -n 1 -s -r -p "Press any key to continue" \ No newline at end of file +read -n 1 -s -r -p "Press any key to continue" +echo diff --git a/v2/debian-workstation.sh b/v2/debian-workstation.sh index 9457646..16048dd 100755 --- a/v2/debian-workstation.sh +++ b/v2/debian-workstation.sh @@ -2,17 +2,27 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_cyan() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -23,5 +33,13 @@ DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" +color_cyan +echo +echo "Starting Debian Workstation setup..." +color_reset +echo "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" +echo + # Pause -read -n 1 -s -r -p "Press any key to continue" \ No newline at end of file +read -n 1 -s -r -p "Press any key to continue" +echo diff --git a/v2/debian-xfce.sh b/v2/debian-xfce.sh index 1741a4c..48a0a19 100755 --- a/v2/debian-xfce.sh +++ b/v2/debian-xfce.sh @@ -2,17 +2,27 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_blue() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -26,21 +36,19 @@ INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" ########################## # 4. Desktop Environment installation ########################## -tput_yellow +color_yellow echo "Installing XFCE..." -tput_reset +color_reset -#detect if XFCE and SDDM are installed and if not install them +# Detect if XFCE and SDDM are installed and install if needed if [[ -z "$DDE" ]]; then - tput_cyan + color_cyan echo echo "No Desktop Environment detected. Installing XFCE (light setup with SDDM)..." - tput_reset + color_reset sudo apt update - sudo apt install -y --no-install-recommends sddm \ - xfce4 \ - xfce4-goodies + sudo apt install -y --no-install-recommends sddm xfce4 xfce4-goodies # Enable SDDM as the display manager sudo systemctl enable sddm @@ -48,23 +56,23 @@ if [[ -z "$DDE" ]]; then # Enable graphical target sudo systemctl set-default graphical.target - tput_green + color_green echo echo "XFCE with SDDM installed successfully." echo "You can reboot now to start XFCE." - tput_reset + color_reset else - tput_cyan + color_cyan echo echo "You already have $DE installed." - tput_reset + color_reset # Check if LightDM is installed and active if systemctl is-active --quiet lightdm; then - tput_yellow + color_yellow echo echo "LightDM is currently active. Replacing with SDDM..." - tput_reset + color_reset # Disable and remove LightDM sudo systemctl disable lightdm @@ -74,14 +82,14 @@ else sudo apt install -y sddm sudo systemctl enable sddm - tput_green + color_green echo echo "LightDM removed and replaced with SDDM." - tput_reset + color_reset else - tput_cyan + color_cyan echo echo "No LightDM detected, leaving current display manager unchanged." - tput_reset + color_reset fi fi diff --git a/v2/debian.sh b/v2/debian.sh index f3fcfd8..a2d8b35 100755 --- a/v2/debian.sh +++ b/v2/debian.sh @@ -2,17 +2,27 @@ set -euo pipefail ########################## -# Color helpers +# Color helpers (no tput) ########################## -tput_reset() { tput sgr0; } -tput_black() { tput setaf 0; } -tput_red() { tput setaf 1; } -tput_green() { tput setaf 2; } -tput_yellow() { tput setaf 3; } -tput_cyan() { tput setaf 4; } -tput_purple() { tput setaf 5; } -tput_cyan() { tput setaf 6; } -tput_gray() { tput setaf 7; } +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_red() { printf '%b' "$RED"; } +color_green() { printf '%b' "$GREEN"; } +color_yellow() { printf '%b' "$YELLOW"; } +color_cyan() { printf '%b' "$CYAN"; } +color_gray() { printf '%b' "$GRAY"; } +color_reset() { printf '%b' "$RESET"; } ########################## # Use exported variables from main detection script @@ -23,10 +33,10 @@ DE="${SELECTED_DE:-none}" TWM="${SELECTED_TWM:-none}" INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" -tput_cyan +color_cyan echo echo "Starting Debian setup..." -tput_reset +color_reset echo echo "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" @@ -34,10 +44,10 @@ echo "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" # 0. Ensure curl is installed ########################## if ! command -v curl >/dev/null 2>&1; then - tput_yellow + color_yellow echo echo "curl is not installed. Installing..." - tput_reset + color_reset sudo apt update sudo apt -y install curl fi @@ -45,24 +55,23 @@ fi ########################## # 1. Add contrib and non-free if missing ########################## -tput_yellow +color_yellow echo echo "Checking /etc/apt/sources.list for contrib/non-free..." -tput_reset +color_reset sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak.$(date +%s) sudo sed -i -r 's/^(deb\s+\S+\s+\S+)\s+(main)$/\1 main contrib non-free/' /etc/apt/sources.list -tput_green +color_green echo echo "Updated sources.list to include contrib/non-free where needed." -tput_reset +color_reset ########################## -# 1a. Check for archive.debian.org and update to deb.debian.org (only if Bullseye or newer) +# 1a. Update archive.debian.org if needed ########################## CURRENT_CODENAME=$(grep -Po 'deb\s+\S+\s+\K\S+' /etc/apt/sources.list | grep -E '^(buster|bullseye|bookworm|trixie)$' | head -n1) DEBIAN_ORDER=(buster bullseye bookworm trixie) -# Function to get numeric index of codename codename_index() { local code="$1" for i in "${!DEBIAN_ORDER[@]}"; do @@ -75,80 +84,80 @@ CURRENT_INDEX=$(codename_index "$CURRENT_CODENAME") BULLSEYE_INDEX=$(codename_index "bullseye") if [[ "$CURRENT_INDEX" -ge "$BULLSEYE_INDEX" ]] && grep -q "archive.debian.org" /etc/apt/sources.list; then - tput_yellow + color_yellow echo echo "Found archive.debian.org in sources.list and system is Bullseye or newer, updating to deb.debian.org..." - tput_reset + color_reset sudo sed -i -r 's|archive\.debian\.org|deb.debian.org|g' /etc/apt/sources.list - tput_green + color_green echo echo "Updated sources.list to use deb.debian.org." - tput_reset + color_reset fi ########################## # 2. Full update and upgrade ########################## -tput_yellow +color_yellow echo echo "Updating package lists..." -tput_reset +color_reset sudo apt update # Autoremove before full-upgrade AUTOREMOVE_PENDING=$(apt -s autoremove | grep -E 'Remv' || true) if [[ -n "$AUTOREMOVE_PENDING" ]]; then - tput_yellow + color_yellow echo echo "Removing packages that are no longer required before upgrade..." - tput_reset + color_reset sudo apt -y autoremove fi -tput_yellow +color_yellow echo echo "Upgrading installed packages..." -tput_reset +color_reset sudo apt -y full-upgrade # Autoremove after full-upgrade AUTOREMOVE_PENDING=$(apt -s autoremove | grep -E 'Remv' || true) if [[ -n "$AUTOREMOVE_PENDING" ]]; then - tput_yellow + color_yellow echo echo "Removing packages that are no longer required after upgrade..." - tput_reset + color_reset sudo apt -y autoremove fi UPGRADE_PENDING=$(apt list --upgradable 2>/dev/null | grep -v Listing || true) if [[ -n "$UPGRADE_PENDING" ]]; then - tput_red + color_red echo echo "Some packages were upgraded. A reboot is recommended before continuing." - tput_reset + color_reset read -rp "Reboot now? [y/N]: " reboot_choice case "${reboot_choice,,}" in y|yes) - tput_red + color_red echo echo "Rebooting now. After reboot, please restart this script to continue..." - tput_reset + color_reset sudo reboot ;; *) - tput_yellow + color_yellow echo echo "Skipping reboot. Make sure to reboot manually before continuing upgrades." - tput_reset + color_reset exit 0 ;; esac else - tput_green + color_green echo echo "All packages are up to date. Continuing to Debian major version check..." - tput_reset + color_reset fi ########################## @@ -158,11 +167,11 @@ DEBIAN_SEQUENCE=(buster bullseye bookworm trixie) CURRENT_CODENAME=$(grep -Po 'deb\s+\S+\s+\K\S+' /etc/apt/sources.list | grep -E '^(buster|bullseye|bookworm|trixie)$' | head -n1) LATEST_CODENAME=${DEBIAN_SEQUENCE[-1]} -tput_cyan +color_cyan echo echo "Current codename: $CURRENT_CODENAME" echo "Latest stable codename: $LATEST_CODENAME" -tput_reset +color_reset while [[ "$CURRENT_CODENAME" != "$LATEST_CODENAME" ]]; do NEXT_CODENAME="" @@ -174,66 +183,64 @@ while [[ "$CURRENT_CODENAME" != "$LATEST_CODENAME" ]]; do done if [[ -z "$NEXT_CODENAME" ]]; then - tput_red + color_red echo echo "Error: Cannot determine next codename after $CURRENT_CODENAME" - tput_reset + color_reset exit 1 fi - tput_yellow + color_yellow echo echo "Detected codename $CURRENT_CODENAME, next stable version: $NEXT_CODENAME" - tput_reset + color_reset read -rp "Do you want to upgrade to $NEXT_CODENAME? [y/N]: " choice case "${choice,,}" in y|yes) - tput_yellow + color_yellow echo echo "Updating sources.list to $NEXT_CODENAME..." - tput_reset + color_reset sudo sed -i -r "s/\b$CURRENT_CODENAME\b/$NEXT_CODENAME/g" /etc/apt/sources.list - tput_yellow + color_yellow echo echo "Updating packages..." - tput_reset + color_reset sudo apt update - # Autoremove before full-upgrade AUTOREMOVE_PENDING=$(apt -s autoremove | grep -E 'Remv' || true) if [[ -n "$AUTOREMOVE_PENDING" ]]; then - tput_yellow + color_yellow echo echo "Removing packages that are no longer required before upgrade..." - tput_reset + color_reset sudo apt -y autoremove fi sudo apt -y full-upgrade - # Autoremove after full-upgrade AUTOREMOVE_PENDING=$(apt -s autoremove | grep -E 'Remv' || true) if [[ -n "$AUTOREMOVE_PENDING" ]]; then - tput_yellow + color_yellow echo echo "Removing packages that are no longer required after upgrade..." - tput_reset + color_reset sudo apt -y autoremove fi - tput_green + color_green echo echo "Upgrade to $NEXT_CODENAME complete. A reboot is recommended." - tput_reset + color_reset read -rp "Press Enter to reboot..." _ sudo reboot ;; *) - tput_yellow + color_yellow echo echo "Skipping upgrade to $NEXT_CODENAME. Continuing with current version." - tput_reset + color_reset break ;; esac @@ -241,42 +248,41 @@ while [[ "$CURRENT_CODENAME" != "$LATEST_CODENAME" ]]; do CURRENT_CODENAME=$(grep -Po 'deb\s+\S+\s+\K\S+' /etc/apt/sources.list | grep -E '^(buster|bullseye|bookworm|trixie)$' | head -n1) done -tput_green +color_green echo echo "Debian is now at codename $CURRENT_CODENAME. Continuing with DE/TWM installation..." -tput_reset +color_reset ########################## # 4. Desktop Environment installation ########################## case "$DE" in xfce|plasma|gnome) - tput_yellow + color_yellow echo echo "Preparing to install $DE..." - tput_reset + color_reset - # Run DE-specific script dynamically SCRIPT_NAME="${OS}-${DE}.sh" if [[ -f "$SCRIPT_NAME" ]]; then - tput_cyan + color_cyan echo echo "Running $SCRIPT_NAME..." - tput_reset + color_reset bash "$SCRIPT_NAME" else - tput_red + color_red echo echo "Error: $SCRIPT_NAME not found!" - tput_reset + color_reset exit 1 fi ;; none) - tput_gray + color_gray echo echo "No Desktop Environment selected, skipping DE installation." - tput_reset + color_reset ;; esac @@ -285,32 +291,31 @@ esac ########################## case "$TWM" in chadwm|hyprland) - tput_yellow + color_yellow echo - echo "Installing CHADWM..." - tput_reset + echo "Installing $TWM..." + color_reset - # Run TWM-specific script dynamically SCRIPT_NAME="${OS}-${TWM}.sh" if [[ -f "$SCRIPT_NAME" ]]; then - tput_cyan + color_cyan echo echo "Running $SCRIPT_NAME..." - tput_reset + color_reset bash "$SCRIPT_NAME" else - tput_red + color_red echo echo "Error: $SCRIPT_NAME not found!" - tput_reset + color_reset exit 1 fi ;; none) - tput_gray + color_gray echo echo "No tiling window manager selected." - tput_reset + color_reset ;; esac @@ -319,30 +324,29 @@ esac ########################## case "$INSTALL_LEVEL" in minimal|full|workstation|server) - tput_cyan + color_cyan echo - echo "Minimal installation selected." - tput_reset + echo "Installation level: $INSTALL_LEVEL" + color_reset - # Run Installation Level-specific script dynamically SCRIPT_NAME="${OS}-${INSTALL_LEVEL}.sh" if [[ -f "$SCRIPT_NAME" ]]; then - tput_cyan + color_cyan echo echo "Running $SCRIPT_NAME..." - tput_reset + color_reset bash "$SCRIPT_NAME" else - tput_red + color_red echo echo "Error: $SCRIPT_NAME not found!" - tput_reset + color_reset exit 1 fi ;; esac -tput_green +color_green echo echo "Debian setup complete." -tput_reset +color_reset