Fixed syntax error

On branch hl-051
 Your branch is up to date with 'origin/hl-051'.

 Changes to be committed:
	modified:   install.sh
This commit is contained in:
Don Williams 2025-10-09 21:46:02 -04:00
parent d298480443
commit 307a0c641f

View File

@ -22,7 +22,7 @@ RESET="$(tput sgr0)"
# Function to print colorful text # Function to print colorful text
print_color() { print_color() {
printf "%b%s%b\n" "$1" "$2" "$RESET" printf "%b%s%b\n" "$1" "$2" "$RESET"
l }
# Warning: End of Life Support # Warning: End of Life Support
printf "\n%.0s" {1..2} printf "\n%.0s" {1..2}
@ -59,17 +59,16 @@ print_color $YELLOW "
" "
printf "\n%.0s" {1..2} printf "\n%.0s" {1..2}
# Prompt user to continue or exit # Prompt user to continue or exit
read -rp "Do you want to continue with the installation? [y/N]: " confirm read -rp "Do you want to continue with the installation? [y/N]: " confirm
case "$confirm" in case "$confirm" in
[yY][eE][sS]|[yY]) [yY][eE][sS] | [yY])
echo -e "${OK} Continuing with installation..." echo -e "${OK} Continuing with installation..."
;; ;;
*) *)
echo -e "${NOTE} You chose not to continue. Exiting..." echo -e "${NOTE} You chose not to continue. Exiting..."
exit 1 exit 1
;; ;;
esac esac
# Create Directory for Install Logs # Create Directory for Install Logs
@ -109,7 +108,6 @@ if ! command -v whiptail >/dev/null; then
printf "\n%.0s" {1..1} printf "\n%.0s" {1..1}
fi fi
printf "\n%.0s" {1..2} printf "\n%.0s" {1..2}
echo -e "\e[35m echo -e "\e[35m
╦╔═┌─┐┌─┐╦ ╦ ╦┬ ┬┌─┐┬─┐┬ ┌─┐┌┐┌┌┬┐ ╦╔═┌─┐┌─┐╦ ╦ ╦┬ ┬┌─┐┬─┐┬ ┌─┐┌┐┌┌┬┐
@ -140,13 +138,12 @@ sleep 1
printf "\n%.0s" {1..1} printf "\n%.0s" {1..1}
# install pciutils if detected not installed. Necessary for detecting GPU # install pciutils if detected not installed. Necessary for detecting GPU
if ! dpkg -l | grep -w pciutils > /dev/null; then if ! dpkg -l | grep -w pciutils >/dev/null; then
echo "pciutils is not installed. Installing..." | tee -a "$LOG" echo "pciutils is not installed. Installing..." | tee -a "$LOG"
sudo apt install -y pciutils sudo apt install -y pciutils
printf "\n%.0s" {1..1} printf "\n%.0s" {1..1}
fi fi
# Path to the install-scripts directory # Path to the install-scripts directory
script_directory=install-scripts script_directory=install-scripts
@ -171,8 +168,8 @@ if [ -f "./hypr-tags.env" ]; then
# shellcheck disable=SC1091 # shellcheck disable=SC1091
source "./hypr-tags.env" source "./hypr-tags.env"
# If core tags are set to auto/latest, refresh to resolve concrete versions # If core tags are set to auto/latest, refresh to resolve concrete versions
if [ "${HYPRUTILS_TAG:-}" = "auto" ] || [ "${HYPRUTILS_TAG:-}" = "latest" ] || [ -z "${HYPRUTILS_TAG:-}" ] || \ if [ "${HYPRUTILS_TAG:-}" = "auto" ] || [ "${HYPRUTILS_TAG:-}" = "latest" ] || [ -z "${HYPRUTILS_TAG:-}" ] ||
[ "${HYPRLANG_TAG:-}" = "auto" ] || [ "${HYPRLANG_TAG:-}" = "latest" ] || [ -z "${HYPRLANG_TAG:-}" ]; then [ "${HYPRLANG_TAG:-}" = "auto" ] || [ "${HYPRLANG_TAG:-}" = "latest" ] || [ -z "${HYPRLANG_TAG:-}" ]; then
if [ -f ./refresh-hypr-tags.sh ]; then if [ -f ./refresh-hypr-tags.sh ]; then
chmod +x ./refresh-hypr-tags.sh || true chmod +x ./refresh-hypr-tags.sh || true
./refresh-hypr-tags.sh ./refresh-hypr-tags.sh
@ -220,7 +217,7 @@ services=("gdm.service" "gdm3.service" "lightdm.service" "lxdm.service")
# Function to check if any login services are active # Function to check if any login services are active
check_services_running() { check_services_running() {
active_services=() # Array to store active services active_services=() # Array to store active services
for svc in "${services[@]}"; do for svc in "${services[@]}"; do
if systemctl is-active --quiet "$svc"; then if systemctl is-active --quiet "$svc"; then
active_services+=("$svc") active_services+=("$svc")
@ -244,7 +241,7 @@ fi
# Check if NVIDIA GPU is detected # Check if NVIDIA GPU is detected
nvidia_detected=false nvidia_detected=false
if lspci | grep -i "nvidia" &> /dev/null; then if lspci | grep -i "nvidia" &>/dev/null; then
nvidia_detected=true nvidia_detected=true
whiptail --title "NVIDIA GPU Detected" --msgbox "NVIDIA GPU detected in your system.\n\nNOTE: The script will install nvidia-dkms, nvidia-utils, and nvidia-settings if you choose to configure." 12 60 whiptail --title "NVIDIA GPU Detected" --msgbox "NVIDIA GPU detected in your system.\n\nNOTE: The script will install nvidia-dkms, nvidia-utils, and nvidia-settings if you choose to configure." 12 60
fi fi
@ -304,20 +301,20 @@ while true; do
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo -e "\n" echo -e "\n"
echo "${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" | tee -a "$LOG" echo "${INFO} You 🫵 cancelled the selection. ${YELLOW}Goodbye!${RESET}" | tee -a "$LOG"
exit 0 # Exit the script if Cancel is pressed exit 0 # Exit the script if Cancel is pressed
fi fi
# If no option was selected, notify and restart the selection # If no option was selected, notify and restart the selection
if [ -z "$selected_options" ]; then if [ -z "$selected_options" ]; then
whiptail --title "Warning" --msgbox "No options were selected. Please select at least one option." 10 60 whiptail --title "Warning" --msgbox "No options were selected. Please select at least one option." 10 60
continue # Return to selection if no options selected continue # Return to selection if no options selected
fi fi
# Strip the quotes and trim spaces if necessary (sanitize the input) # Strip the quotes and trim spaces if necessary (sanitize the input)
selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ') selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ')
# Convert selected options into an array (preserving spaces in values) # Convert selected options into an array (preserving spaces in values)
IFS=' ' read -r -a options <<< "$selected_options" IFS=' ' read -r -a options <<<"$selected_options"
# Check if the "dots" option was selected # Check if the "dots" option was selected
dots_selected="OFF" dots_selected="OFF"
@ -332,14 +329,14 @@ while true; do
if [[ "$dots_selected" == "OFF" ]]; then if [[ "$dots_selected" == "OFF" ]]; then
# Show a note about not selecting the "dots" option # Show a note about not selecting the "dots" option
if ! whiptail --title "KooL Hyprland Dot Files" --yesno \ if ! whiptail --title "KooL Hyprland Dot Files" --yesno \
"You have not selected to install the pre-configured KooL Hyprland dotfiles.\n\nKindly NOTE that if you proceed without Dots, Hyprland will start with default vanilla Hyprland configuration and I won't be able to give you support.\n\nWould you like to continue install without KooL Hyprland Dots or return to choices/options?" \ "You have not selected to install the pre-configured KooL Hyprland dotfiles.\n\nKindly NOTE that if you proceed without Dots, Hyprland will start with default vanilla Hyprland configuration and I won't be able to give you support.\n\nWould you like to continue install without KooL Hyprland Dots or return to choices/options?" \
--yes-button "Continue" --no-button "Return" 15 90; then --yes-button "Continue" --no-button "Return" 15 90; then
echo "🔙 Returning to options..." | tee -a "$LOG" echo "🔙 Returning to options..." | tee -a "$LOG"
continue continue
else else
# User chose to continue # User chose to continue
echo "${INFO} ⚠️ Continuing WITHOUT the dotfiles installation..." | tee -a "$LOG" echo "${INFO} ⚠️ Continuing WITHOUT the dotfiles installation..." | tee -a "$LOG"
printf "\n%.0s" {1..1} printf "\n%.0s" {1..1}
fi fi
fi fi
@ -381,8 +378,8 @@ execute_script "fonts.sh"
# Optional: refresh tags before building the Hyprland stack # Optional: refresh tags before building the Hyprland stack
# Set FETCH_LATEST=1 to opt-in (default is no-refresh to honor pinned tags) # Set FETCH_LATEST=1 to opt-in (default is no-refresh to honor pinned tags)
if [ "${FETCH_LATEST:-0}" = "1" ] && [ -f ./refresh-hypr-tags.sh ]; then if [ "${FETCH_LATEST:-0}" = "1" ] && [ -f ./refresh-hypr-tags.sh ]; then
chmod +x ./refresh-hypr-tags.sh || true chmod +x ./refresh-hypr-tags.sh || true
./refresh-hypr-tags.sh ./refresh-hypr-tags.sh
fi fi
echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG" echo "${INFO} Installing ${SKY_BLUE}KooL Hyprland packages...${RESET}" | tee -a "$LOG"
@ -432,73 +429,73 @@ sleep 1
selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ') selected_options=$(echo "$selected_options" | tr -d '"' | tr -s ' ')
# Convert selected options into an array (splitting by spaces) # Convert selected options into an array (splitting by spaces)
IFS=' ' read -r -a options <<< "$selected_options" IFS=' ' read -r -a options <<<"$selected_options"
# Loop through selected options # Loop through selected options
for option in "${options[@]}"; do for option in "${options[@]}"; do
case "$option" in case "$option" in
sddm) sddm)
if check_services_running; then if check_services_running; then
active_list=$(printf "%s\n" "${active_services[@]}") active_list=$(printf "%s\n" "${active_services[@]}")
whiptail --title "Error" --msgbox "One of the following login services is running:\n$active_list\n\nPlease stop & disable it or DO not choose SDDM." 12 60 whiptail --title "Error" --msgbox "One of the following login services is running:\n$active_list\n\nPlease stop & disable it or DO not choose SDDM." 12 60
exec "$0" exec "$0"
else else
echo "${INFO} Installing and configuring ${SKY_BLUE}SDDM...${RESET}" | tee -a "$LOG" echo "${INFO} Installing and configuring ${SKY_BLUE}SDDM...${RESET}" | tee -a "$LOG"
execute_script "sddm.sh" execute_script "sddm.sh"
fi fi
;; ;;
nvidia) nvidia)
echo "${INFO} Configuring ${SKY_BLUE}nvidia stuff${RESET}" | tee -a "$LOG" echo "${INFO} Configuring ${SKY_BLUE}nvidia stuff${RESET}" | tee -a "$LOG"
execute_script "nvidia.sh" execute_script "nvidia.sh"
;; ;;
gtk_themes) gtk_themes)
echo "${INFO} Installing ${SKY_BLUE}GTK themes...${RESET}" | tee -a "$LOG" echo "${INFO} Installing ${SKY_BLUE}GTK themes...${RESET}" | tee -a "$LOG"
execute_script "gtk_themes.sh" execute_script "gtk_themes.sh"
;; ;;
input_group) input_group)
echo "${INFO} Adding user into ${SKY_BLUE}input group...${RESET}" | tee -a "$LOG" echo "${INFO} Adding user into ${SKY_BLUE}input group...${RESET}" | tee -a "$LOG"
execute_script "InputGroup.sh" execute_script "InputGroup.sh"
;; ;;
ags) ags)
echo "${INFO} Installing ${SKY_BLUE}AGS v1 for Desktop Overview...${RESET}" | tee -a "$LOG" echo "${INFO} Installing ${SKY_BLUE}AGS v1 for Desktop Overview...${RESET}" | tee -a "$LOG"
execute_script "ags.sh" execute_script "ags.sh"
;; ;;
xdph) xdph)
echo "${INFO} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG" echo "${INFO} Installing ${SKY_BLUE}xdg-desktop-portal-hyprland...${RESET}" | tee -a "$LOG"
execute_script "xdph.sh" execute_script "xdph.sh"
;; ;;
bluetooth) bluetooth)
echo "${INFO} Configuring ${SKY_BLUE}Bluetooth...${RESET}" | tee -a "$LOG" echo "${INFO} Configuring ${SKY_BLUE}Bluetooth...${RESET}" | tee -a "$LOG"
execute_script "bluetooth.sh" execute_script "bluetooth.sh"
;; ;;
thunar) thunar)
echo "${INFO} Installing ${SKY_BLUE}Thunar file manager...${RESET}" | tee -a "$LOG" echo "${INFO} Installing ${SKY_BLUE}Thunar file manager...${RESET}" | tee -a "$LOG"
execute_script "thunar.sh" execute_script "thunar.sh"
execute_script "thunar_default.sh" execute_script "thunar_default.sh"
;; ;;
sddm_theme) sddm_theme)
echo "${INFO} Downloading & Installing ${SKY_BLUE}Additional SDDM theme...${RESET}" | tee -a "$LOG" echo "${INFO} Downloading & Installing ${SKY_BLUE}Additional SDDM theme...${RESET}" | tee -a "$LOG"
execute_script "sddm_theme.sh" execute_script "sddm_theme.sh"
;; ;;
zsh) zsh)
echo "${INFO} Installing ${SKY_BLUE}zsh with Oh-My-Zsh...${RESET}" | tee -a "$LOG" echo "${INFO} Installing ${SKY_BLUE}zsh with Oh-My-Zsh...${RESET}" | tee -a "$LOG"
execute_script "zsh.sh" execute_script "zsh.sh"
;; ;;
pokemon) pokemon)
echo "${INFO} Adding ${SKY_BLUE}Pokemon color scripts to terminal...${RESET}" | tee -a "$LOG" echo "${INFO} Adding ${SKY_BLUE}Pokemon color scripts to terminal...${RESET}" | tee -a "$LOG"
execute_script "zsh_pokemon.sh" execute_script "zsh_pokemon.sh"
;; ;;
rog) rog)
echo "${INFO} Installing ${SKY_BLUE}ROG laptop packages...${RESET}" | tee -a "$LOG" echo "${INFO} Installing ${SKY_BLUE}ROG laptop packages...${RESET}" | tee -a "$LOG"
execute_script "rog.sh" execute_script "rog.sh"
;; ;;
dots) dots)
echo "${INFO} Installing pre-configured ${SKY_BLUE}KooL Hyprland dotfiles...${RESET}" | tee -a "$LOG" echo "${INFO} Installing pre-configured ${SKY_BLUE}KooL Hyprland dotfiles...${RESET}" | tee -a "$LOG"
execute_script "dotfiles-branch.sh" execute_script "dotfiles-branch.sh"
;; ;;
*) *)
echo "Unknown option: $option" | tee -a "$LOG" echo "Unknown option: $option" | tee -a "$LOG"
;; ;;
esac esac
done done
@ -513,7 +510,6 @@ for file in "${files_to_delete[@]}"; do
fi fi
done done
clear clear
# copy fastfetch config if debian is not present # copy fastfetch config if debian is not present
@ -553,7 +549,7 @@ if [ -e /usr/local/bin/hyprland ] || [ -f /usr/local/bin/Hyprland ]; then
echo "👌 ${OK} You chose NOT to reboot" echo "👌 ${OK} You chose NOT to reboot"
printf "\n%.0s" {1..1} printf "\n%.0s" {1..1}
# Check if NVIDIA GPU is present # Check if NVIDIA GPU is present
if lspci | grep -i "nvidia" &> /dev/null; then if lspci | grep -i "nvidia" &>/dev/null; then
echo "${INFO} HOWEVER ${YELLOW}NVIDIA GPU${RESET} detected. Reminder that you must REBOOT your SYSTEM..." echo "${INFO} HOWEVER ${YELLOW}NVIDIA GPU${RESET} detected. Reminder that you must REBOOT your SYSTEM..."
printf "\n%.0s" {1..1} printf "\n%.0s" {1..1}
fi fi
@ -570,4 +566,3 @@ else
fi fi
printf "\n%.0s" {1..2} printf "\n%.0s" {1..2}