v3-revamp
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ pause_if_debug() {
|
||||
#------------------------------------------
|
||||
echo
|
||||
color_yellow "----------------------------------------------------------------"
|
||||
color_yellow " script version 3.0"
|
||||
color_yellow "Script version 3.0"
|
||||
color_yellow "----------------------------------------------------------------"
|
||||
echo
|
||||
|
||||
|
||||
@@ -17,12 +17,11 @@ if [ ! -t 1 ]; then
|
||||
RED="" GREEN="" YELLOW="" CYAN="" GRAY="" BOLD="" RESET=""
|
||||
fi
|
||||
|
||||
color_yellow() { printf '%b' "$YELLOW"; }
|
||||
color_cyan() { printf '%b' "$CYAN"; }
|
||||
color_red() { printf '%b' "$RED"; }
|
||||
color_green() { printf '%b' "$GREEN"; }
|
||||
color_gray() { printf '%b' "$GRAY"; }
|
||||
color_reset() { printf '%b' "$RESET"; }
|
||||
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
|
||||
|
||||
@@ -17,12 +17,11 @@ if [ ! -t 1 ]; then
|
||||
RED="" GREEN="" YELLOW="" CYAN="" GRAY="" BOLD="" RESET=""
|
||||
fi
|
||||
|
||||
color_yellow() { printf '%b' "$YELLOW"; }
|
||||
color_cyan() { printf '%b' "$CYAN"; }
|
||||
color_red() { printf '%b' "$RED"; }
|
||||
color_green() { printf '%b' "$GREEN"; }
|
||||
color_gray() { printf '%b' "$GRAY"; }
|
||||
color_reset() { printf '%b' "$RESET"; }
|
||||
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
|
||||
@@ -99,8 +98,8 @@ fi
|
||||
#------------------------------------------
|
||||
# 4. Enable Services
|
||||
#------------------------------------------
|
||||
color_cyan; echo "Enabling services..."; color_reset
|
||||
color_cyan "Enabling services..."
|
||||
sudo systemctl enable --now fstrim.timer
|
||||
sudo systemctl enable --now chronyd || true
|
||||
|
||||
color_green; echo "Fedora Minimal setup completed."; color_reset
|
||||
color_green "Fedora Minimal setup completed."
|
||||
+17
-19
@@ -17,13 +17,11 @@ if [ ! -t 1 ]; then
|
||||
RED="" GREEN="" YELLOW="" CYAN="" GRAY="" BOLD="" RESET=""
|
||||
fi
|
||||
|
||||
color_yellow() { printf '%b' "$YELLOW"; }
|
||||
color_cyan() { printf '%b' "$CYAN"; }
|
||||
color_red() { printf '%b' "$RED"; }
|
||||
color_green() { printf '%b' "$GREEN"; }
|
||||
color_gray() { printf '%b' "$GRAY"; }
|
||||
color_reset() { printf '%b' "$RESET"; }
|
||||
|
||||
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
|
||||
@@ -120,22 +118,22 @@ sudo dnf update -y
|
||||
color_yellow "Detected OS / Desktop Environment / Tiling Window Manager"
|
||||
echo
|
||||
color_gray "Installing OS-specific packages..."
|
||||
color_gray "Selected DE: $DE"
|
||||
color_gray "Selected TWM: $TWM"
|
||||
color_gray "Installation Level: $INSTALL_LEVEL"
|
||||
color_gray "Selected DE:" "$DE"
|
||||
color_gray "Selected TWM:" "$TWM"
|
||||
color_gray "Installation Level:" "$INSTALL_LEVEL"
|
||||
|
||||
#------------------------------------------
|
||||
# 4. Desktop Environment installation
|
||||
#------------------------------------------
|
||||
case "$DE" in
|
||||
xfce|plasma|gnome)
|
||||
color_yellow "Preparing to install $DE..."
|
||||
color_yellow "Preparing to install" "$DE"
|
||||
SCRIPT_NAME="$SCRIPT_DIR/${OS}-${DE}.sh"
|
||||
if [[ -f "$SCRIPT_NAME" ]]; then
|
||||
color_cyan "Running $SCRIPT_NAME..."
|
||||
color_cyan "Running" "$SCRIPT_NAME"
|
||||
bash "$SCRIPT_NAME"
|
||||
else
|
||||
color_red "Error: $SCRIPT_NAME not found!"
|
||||
color_red "Error:" "$SCRIPT_NAME" "not found!"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
@@ -149,13 +147,13 @@ esac
|
||||
#------------------------------------------
|
||||
case "$TWM" in
|
||||
chadwm|hyprland|niri)
|
||||
color_yellow "Installing $TWM..."
|
||||
color_yellow "Installing" "$TWM"
|
||||
SCRIPT_NAME="$SCRIPT_DIR/${OS}-${TWM}.sh"
|
||||
if [[ -f "$SCRIPT_NAME" ]]; then
|
||||
color_cyan "Running $SCRIPT_NAME..."
|
||||
color_cyan "Running" "$SCRIPT_NAME"
|
||||
bash "$SCRIPT_NAME"
|
||||
else
|
||||
color_red "Error: $SCRIPT_NAME not found!"
|
||||
color_red "Error:" "$SCRIPT_NAME" "not found!"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
@@ -169,13 +167,13 @@ esac
|
||||
#------------------------------------------
|
||||
case "$INSTALL_LEVEL" in
|
||||
minimal|full|workstation|server)
|
||||
color_cyan "Installation level: $INSTALL_LEVEL"
|
||||
color_cyan "Installation level:" "$INSTALL_LEVEL"
|
||||
SCRIPT_NAME="$SCRIPT_DIR/${OS}-${INSTALL_LEVEL}.sh"
|
||||
if [[ -f "$SCRIPT_NAME" ]]; then
|
||||
color_cyan "Running $SCRIPT_NAME..."
|
||||
color_cyan "Running" "$SCRIPT_NAME"
|
||||
bash "$SCRIPT_NAME"
|
||||
else
|
||||
color_red "Error: $SCRIPT_NAME not found!"
|
||||
color_red "Error:" "$SCRIPT_NAME" "not found!"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user