diff --git a/tabs/applications-setup/alacritty-setup.sh b/tabs/applications-setup/alacritty-setup.sh index 1d16f44f6..3625ca966 100755 --- a/tabs/applications-setup/alacritty-setup.sh +++ b/tabs/applications-setup/alacritty-setup.sh @@ -5,12 +5,12 @@ installAlacritty() { echo "Installing Alacritty..." if ! command_exists alacritty; then - case ${PACKAGER} in + case "$PACKAGER" in pacman) - $ESCALATION_TOOL ${PACKAGER} -S --needed --noconfirm alacritty + $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm alacritty ;; *) - $ESCALATION_TOOL ${PACKAGER} install -y alacritty + $ESCALATION_TOOL "$PACKAGER" install -y alacritty ;; esac else diff --git a/tabs/applications-setup/fastfetch-setup.sh b/tabs/applications-setup/fastfetch-setup.sh index e48cb5802..83fb52fa6 100644 --- a/tabs/applications-setup/fastfetch-setup.sh +++ b/tabs/applications-setup/fastfetch-setup.sh @@ -6,12 +6,12 @@ installFastfetch() { printf "%b\n" "${YELLOW}Installing Fastfetch if not already installed...${RC}" if ! command_exists fastfetch; then - case ${PACKAGER} in + case "$PACKAGER" in pacman) - $ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm fastfetch + $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm fastfetch ;; *) - $ESCALATION_TOOL "${PACKAGER}" install -y fastfetch + $ESCALATION_TOOL "$PACKAGER" install -y fastfetch ;; esac else diff --git a/tabs/applications-setup/kitty-setup.sh b/tabs/applications-setup/kitty-setup.sh index 4a376e1ab..480eed829 100755 --- a/tabs/applications-setup/kitty-setup.sh +++ b/tabs/applications-setup/kitty-setup.sh @@ -5,12 +5,12 @@ installKitty() { printf "%b\n" "${YELLOW}Install Kitty if not already installed...${RC}" if ! command_exists kitty; then - case ${PACKAGER} in + case "$PACKAGER" in pacman) - $ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm kitty + $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm kitty ;; *) - $ESCALATION_TOOL "${PACKAGER}" install -y kitty + $ESCALATION_TOOL "$PACKAGER" install -y kitty ;; esac else diff --git a/tabs/common-script.sh b/tabs/common-script.sh index 678a45162..97721eaf3 100644 --- a/tabs/common-script.sh +++ b/tabs/common-script.sh @@ -82,7 +82,7 @@ checkPackageManager() { fi done - if [ -z "${PACKAGER}" ]; then + if [ -z "$PACKAGER" ]; then printf "%b\n" "${RED}Can't find a supported package manager${RC}" exit 1 fi @@ -126,7 +126,7 @@ checkDistro() { checkEnv() { checkCommandRequirements 'curl groups sudo' - checkPackageManager 'apt-get nala dnf pacman zypper yum xbps-install nix-env' + checkPackageManager 'nala apt-get dnf pacman zypper yum xbps-install nix-env' checkCurrentDirectoryWritable checkSuperUser checkDistro diff --git a/tabs/security/firewall-baselines.sh b/tabs/security/firewall-baselines.sh index 796889fd3..8ce390486 100644 --- a/tabs/security/firewall-baselines.sh +++ b/tabs/security/firewall-baselines.sh @@ -5,12 +5,12 @@ installPkg() { echo "Installing UFW..." if ! command_exists ufw; then - case ${PACKAGER} in + case "$PACKAGER" in pacman) - $ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm ufw + $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm ufw ;; *) - $ESCALATION_TOOL "${PACKAGER}" install -y ufw + $ESCALATION_TOOL "$PACKAGER" install -y ufw ;; esac else diff --git a/tabs/system-setup/1-compile-setup.sh b/tabs/system-setup/1-compile-setup.sh index 0ed8f05cd..7f1b3f733 100755 --- a/tabs/system-setup/1-compile-setup.sh +++ b/tabs/system-setup/1-compile-setup.sh @@ -6,7 +6,7 @@ installDepend() { ## Check for dependencies. DEPENDENCIES='tar tree multitail tldr trash-cli unzip cmake make jq' printf "%b\n" "${YELLOW}Installing dependencies...${RC}" - case $PACKAGER in + case "$PACKAGER" in pacman) if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then echo "[multilib]" | $ESCALATION_TOOL tee -a /etc/pacman.conf diff --git a/tabs/system-setup/3-global-theme.sh b/tabs/system-setup/3-global-theme.sh index c3e360da5..141d0dd22 100644 --- a/tabs/system-setup/3-global-theme.sh +++ b/tabs/system-setup/3-global-theme.sh @@ -4,21 +4,21 @@ install_theme_tools() { printf "%b\n" "${YELLOW}Installing theme tools (qt6ct and kvantum)...${RC}\n" - case $PACKAGER in - apt-get) - $ESCALATION_TOOL apt-get update - $ESCALATION_TOOL apt-get install -y qt6ct kvantum + case "$PACKAGER" in + apt-get|nala) + $ESCALATION_TOOL "$PACKAGER" update + $ESCALATION_TOOL "$PACKAGER" install -y qt6ct kvantum ;; zypper) - $ESCALATION_TOOL zypper refresh - $ESCALATION_TOOL zypper --non-interactive install qt6ct kvantum + $ESCALATION_TOOL "$PACKAGER" refresh + $ESCALATION_TOOL "$PACKAGER" --non-interactive install qt6ct kvantum ;; dnf) - $ESCALATION_TOOL dnf update - $ESCALATION_TOOL dnf install -y qt6ct kvantum + $ESCALATION_TOOL "$PACKAGER" update + $ESCALATION_TOOL "$PACKAGER" install -y qt6ct kvantum ;; pacman) - $ESCALATION_TOOL pacman -S --needed --noconfirm qt6ct kvantum + $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm qt6ct kvantum ;; *) printf "%b\n" "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}\n" diff --git a/tabs/system-setup/4-remove-snaps.sh b/tabs/system-setup/4-remove-snaps.sh index f72fd658a..2cba860bb 100644 --- a/tabs/system-setup/4-remove-snaps.sh +++ b/tabs/system-setup/4-remove-snaps.sh @@ -3,21 +3,21 @@ . ../common-script.sh removeSnaps() { - case $PACKAGER in + case "$PACKAGER" in pacman) - $ESCALATION_TOOL ${PACKAGER} -Rns snapd + $ESCALATION_TOOL "$PACKAGER" -Rns snapd ;; apt-get|nala) - $ESCALATION_TOOL ${PACKAGER} autoremove --purge snapd + $ESCALATION_TOOL "$PACKAGER" autoremove --purge snapd if [ "$ID" = ubuntu ]; then $ESCALATION_TOOL apt-mark hold snapd fi ;; dnf) - $ESCALATION_TOOL ${PACKAGER} remove snapd + $ESCALATION_TOOL "$PACKAGER" remove snapd ;; zypper) - $ESCALATION_TOOL ${PACKAGER} remove snapd + $ESCALATION_TOOL "$PACKAGER" remove snapd ;; *) printf "%b\n" "${RED}Removing snapd not implemented for this package manager${RC}" diff --git a/tabs/system-setup/arch/paru-setup.sh b/tabs/system-setup/arch/paru-setup.sh index 51edfb09e..490935157 100755 --- a/tabs/system-setup/arch/paru-setup.sh +++ b/tabs/system-setup/arch/paru-setup.sh @@ -3,7 +3,7 @@ . ../../common-script.sh installDepend() { - case $PACKAGER in + case "$PACKAGER" in pacman) if ! command_exists paru; then echo "Installing paru as AUR helper..." diff --git a/tabs/system-setup/arch/yay-setup.sh b/tabs/system-setup/arch/yay-setup.sh index 010192ce5..25fb2ee88 100755 --- a/tabs/system-setup/arch/yay-setup.sh +++ b/tabs/system-setup/arch/yay-setup.sh @@ -3,7 +3,7 @@ . ../../common-script.sh installDepend() { - case $PACKAGER in + case "$PACKAGER" in pacman) if ! command_exists yay; then echo "Installing yay as AUR helper..." diff --git a/tabs/system-setup/fedora/rpm-fusion-setup.sh b/tabs/system-setup/fedora/rpm-fusion-setup.sh index 52396d5df..f611a0be1 100644 --- a/tabs/system-setup/fedora/rpm-fusion-setup.sh +++ b/tabs/system-setup/fedora/rpm-fusion-setup.sh @@ -5,7 +5,7 @@ # https://rpmfusion.org/Configuration installRPMFusion() { - case $PACKAGER in + case "$PACKAGER" in dnf) if [ ! -e /etc/yum.repos.d/rpmfusion-free.repo ] || [ ! -e /etc/yum.repos.d/rpmfusion-nonfree.repo ]; then echo "Installing RPM Fusion..." diff --git a/tabs/system-setup/system-update.sh b/tabs/system-setup/system-update.sh index 4529befee..7df96be0c 100755 --- a/tabs/system-setup/system-update.sh +++ b/tabs/system-setup/system-update.sh @@ -3,7 +3,7 @@ . ../common-script.sh fastUpdate() { - case ${PACKAGER} in + case "$PACKAGER" in pacman) $AUR_HELPER -S --needed --noconfirm rate-mirrors-bin @@ -31,27 +31,27 @@ fastUpdate() { $ESCALATION_TOOL apt-get install -y nala || { printf "%b\n" "${YELLOW}Falling back to apt-get${RC}"; PACKAGER="apt-get"; } fi - if [ "${PACKAGER}" = "nala" ]; then + if [ "$PACKAGER" = "nala" ]; then $ESCALATION_TOOL cp /etc/apt/sources.list /etc/apt/sources.list.bak $ESCALATION_TOOL nala update PACKAGER="nala" fi - $ESCALATION_TOOL ${PACKAGER} upgrade -y + $ESCALATION_TOOL "$PACKAGER" upgrade -y ;; dnf) - $ESCALATION_TOOL ${PACKAGER} update -y + $ESCALATION_TOOL "$PACKAGER" update -y ;; zypper) - $ESCALATION_TOOL ${PACKAGER} ref - $ESCALATION_TOOL ${PACKAGER} --non-interactive dup + $ESCALATION_TOOL "$PACKAGER" ref + $ESCALATION_TOOL "$PACKAGER" --non-interactive dup ;; yum) - $ESCALATION_TOOL ${PACKAGER} update -y - $ESCALATION_TOOL ${PACKAGER} upgrade -y + $ESCALATION_TOOL "$PACKAGER" update -y + $ESCALATION_TOOL "$PACKAGER" upgrade -y ;; xbps-install) - $ESCALATION_TOOL ${PACKAGER} -Syu + $ESCALATION_TOOL "$PACKAGER" -Syu ;; *) printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" @@ -61,26 +61,26 @@ fastUpdate() { } updateSystem() { - printf "%b\n" "${YELLOW}Updating system${RC}" - case ${PACKAGER} in + printf "%b\n" "${GREEN}Updating system${RC}" + case "$PACKAGER" in nala|apt-get) - $ESCALATION_TOOL "${PACKAGER}" update -y - $ESCALATION_TOOL "${PACKAGER}" upgrade -y + $ESCALATION_TOOL "$PACKAGER" update -y + $ESCALATION_TOOL "$PACKAGER" upgrade -y ;; yum|dnf) - $ESCALATION_TOOL "${PACKAGER}" update -y - $ESCALATION_TOOL "${PACKAGER}" upgrade -y + $ESCALATION_TOOL "$PACKAGER" update -y + $ESCALATION_TOOL "$PACKAGER" upgrade -y ;; pacman) - $ESCALATION_TOOL "${PACKAGER}" -Sy --noconfirm --needed archlinux-keyring - $ESCALATION_TOOL "${PACKAGER}" -Su --noconfirm + $ESCALATION_TOOL "$PACKAGER" -Sy --noconfirm --needed archlinux-keyring + $ESCALATION_TOOL "$PACKAGER" -Su --noconfirm ;; zypper) - $ESCALATION_TOOL ${PACKAGER} ref - $ESCALATION_TOOL ${PACKAGER} --non-interactive dup + $ESCALATION_TOOL "$PACKAGER" ref + $ESCALATION_TOOL "$PACKAGER" --non-interactive dup ;; xbps-install) - $ESCALATION_TOOL ${PACKAGER} -Syu + $ESCALATION_TOOL "$PACKAGER" -Syu ;; *) printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}${RC}" diff --git a/tabs/utils/bluetooth-control.sh b/tabs/utils/bluetooth-control.sh index 508d3708a..51aa16221 100644 --- a/tabs/utils/bluetooth-control.sh +++ b/tabs/utils/bluetooth-control.sh @@ -6,12 +6,12 @@ setupBluetooth() { printf "%b\n" "${YELLOW}Installing Bluez...${RC}" if ! command_exists bluetoothctl; then - case ${PACKAGER} in + case "$PACKAGER" in pacman) - $ESCALATION_TOOL "${PACKAGER}" -S --noconfirm bluez-utils + $ESCALATION_TOOL "$PACKAGER" -S --noconfirm bluez-utils ;; *) - $ESCALATION_TOOL "${PACKAGER}" install -y bluez + $ESCALATION_TOOL "$PACKAGER" install -y bluez ;; esac else @@ -147,5 +147,6 @@ remove_device() { # Initialize checkEnv +checkEscalationTool setupBluetooth main_menu diff --git a/tabs/utils/monitor-control/utility_functions.sh b/tabs/utils/monitor-control/utility_functions.sh index 6c811a84f..42b324c2e 100755 --- a/tabs/utils/monitor-control/utility_functions.sh +++ b/tabs/utils/monitor-control/utility_functions.sh @@ -6,15 +6,15 @@ setup_xrandr() { echo "Install xrandr if not already installed..." if ! command_exists xrandr; then - case ${PACKAGER} in + case "$PACKAGER" in pacman) - $ESCALATION_TOOL "${PACKAGER}" -S --noconfirm xorg-xrandr + $ESCALATION_TOOL "$PACKAGER" -S --noconfirm xorg-xrandr ;; - apt-get) - $ESCALATION_TOOL "${PACKAGER}" install -y x11-xserver-utils + apt-get|nala) + $ESCALATION_TOOL "$PACKAGER" install -y x11-xserver-utils ;; *) - $ESCALATION_TOOL "${PACKAGER}" install -y xorg-x11-server-utils + $ESCALATION_TOOL "$PACKAGER" install -y xorg-x11-server-utils ;; esac else @@ -90,4 +90,5 @@ confirm_action() { } checkEnv -setup_xrandr \ No newline at end of file +checkEscalationTool +setup_xrandr diff --git a/tabs/utils/numlock.sh b/tabs/utils/numlock.sh index 2b23c3f16..79f2f6808 100755 --- a/tabs/utils/numlock.sh +++ b/tabs/utils/numlock.sh @@ -60,5 +60,6 @@ numlockSetup() { fi } +checkEnv checkEscalationTool numlockSetup diff --git a/tabs/utils/wifi-control.sh b/tabs/utils/wifi-control.sh index 036e2a28c..2a6686a81 100644 --- a/tabs/utils/wifi-control.sh +++ b/tabs/utils/wifi-control.sh @@ -6,15 +6,15 @@ setupNetworkManager() { printf "%b\n" "${YELLOW}Installing NetworkManager...${RC}" if ! command_exists nmcli; then - case ${PACKAGER} in + case "$PACKAGER" in pacman) - $ESCALATION_TOOL "${PACKAGER}" -S --noconfirm networkmanager + $ESCALATION_TOOL "$PACKAGER" -S --noconfirm networkmanager ;; dnf) - $ESCALATION_TOOL "${PACKAGER}" install -y NetworkManager-1 + $ESCALATION_TOOL "$PACKAGER" install -y NetworkManager-1 ;; *) - $ESCALATION_TOOL "${PACKAGER}" install -y network-manager + $ESCALATION_TOOL "$PACKAGER" install -y network-manager ;; esac else @@ -186,5 +186,6 @@ remove_network() { # Initialize checkEnv +checkEscalationTool setupNetworkManager main_menu