From 6be320bf5d98289b6a1205b9f9a07e23a2d95bc7 Mon Sep 17 00:00:00 2001 From: David Young Date: Sun, 15 Mar 2026 11:03:07 -0600 Subject: [PATCH] install from packages.conf --- install.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 43ee4ce..4ab6c02 100755 --- a/install.sh +++ b/install.sh @@ -19,12 +19,22 @@ EOF # Install packages helper install_packages() { - local packages=("$@") - if [[ ${#packages[@]} -eq 0 ]]; then + local conf_file="$(dirname "$0")/packages.conf" + + if [ ! -f "$conf_file" ]; then + echo "Error: packages.conf not found at $conf_file" + exit 1 + fi + + source "$conf_file" + + if [[ ${#PACKAGES[@]} -eq 0 ]]; then echo "Warning: no packages to install." return fi - yay -S --needed --noconfirm "${packages[@]}" + + echo "Installing ${#PACKAGES[@]} packages..." + yay -S --needed --noconfirm "${PACKAGES[@]}" } # Install yay AUR helper