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