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 helper
|
||||||
install_packages() {
|
install_packages() {
|
||||||
local packages=("$@")
|
local conf_file="$(dirname "$0")/packages.conf"
|
||||||
if [[ ${#packages[@]} -eq 0 ]]; then
|
|
||||||
|
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."
|
echo "Warning: no packages to install."
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
yay -S --needed --noconfirm "${packages[@]}"
|
|
||||||
|
echo "Installing ${#PACKAGES[@]} packages..."
|
||||||
|
yay -S --needed --noconfirm "${PACKAGES[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install yay AUR helper
|
# Install yay AUR helper
|
||||||
|
|||||||
Reference in New Issue
Block a user