install from packages.conf
This commit is contained in:
16
install.sh
16
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
|
||||
|
||||
Reference in New Issue
Block a user