From e4b415462d2a8d1827937e5f6327af845b741ca3 Mon Sep 17 00:00:00 2001 From: "[yuri]" <[yuri.kuit@gmail.com]> Date: Tue, 11 Nov 2025 17:00:15 +0100 Subject: [PATCH] bugfixes --- v2/arch-minimal.sh | 6 +++--- v2/arch-xfce.sh | 14 +++----------- v2/arch.sh | 12 +++--------- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/v2/arch-minimal.sh b/v2/arch-minimal.sh index f7885e9..0b8bb4e 100755 --- a/v2/arch-minimal.sh +++ b/v2/arch-minimal.sh @@ -37,9 +37,9 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ########################## # Helper functions ########################## -install_packages() { sudo pacman -Sy; sudo pacman -S --noconfirm --needed "$1"; } -is_package_installed() { pacman -Qi "$1" &>/dev/null; } -remove_packages() { sudo pacman -Rs --noconfirm "$1"; } +install_packages() { sudo pacman -Sy; sudo pacman -S --noconfirm --needed "$@"; } +is_package_installed() { pacman -Qi "$@" &>/dev/null; } +remove_packages() { sudo pacman -Rs --noconfirm "$@"; } say_yellow "Starting minimal setup..." diff --git a/v2/arch-xfce.sh b/v2/arch-xfce.sh index 649ea04..95cd5ef 100755 --- a/v2/arch-xfce.sh +++ b/v2/arch-xfce.sh @@ -37,17 +37,9 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ########################## # Helper functions ########################## -install_packages() { - sudo pacman -S --noconfirm --needed "$1" -} - -remove_packages() { - sudo pacman -Rs --noconfirm "$1" -} - -is_package_installed() { - pacman -Qi "$1" &>/dev/null -} +install_packages() { sudo pacman -S --noconfirm --needed "$@"; } +remove_packages() { sudo pacman -Rs --noconfirm "$@"; } +is_package_installed() { pacman -Qi "$@" &>/dev/null; } detect_de() { if command -v xfce4-session >/dev/null 2>&1; then diff --git a/v2/arch.sh b/v2/arch.sh index eb74c53..13e882a 100755 --- a/v2/arch.sh +++ b/v2/arch.sh @@ -42,15 +42,9 @@ say_gray "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" ########################## # Helper functions ########################## -install_packages() { - local packages=("$@") - sudo apt update - sudo apt install -y --no-install-recommends "${packages[@]}" -} - -is_package_installed() { - dpkg -s "$1" &>/dev/null -} +install_packages() { sudo pacman -S --noconfirm --needed "$@"; } +remove_packages() { sudo pacman -Rs --noconfirm "$@"; } +is_package_installed() { pacman -Qi "$@" &>/dev/null; } ########################## # 0. Ensure base is ready for installation