dotfiles/scripts/20-install-pkgs.sh
2023-10-14 22:38:10 +02:00

23 lines
676 B
Bash

#!/bin/sh
PACKAGE_LIST=${PACKAGE_LIST:-./package.list}
GRAPHICAL_PACKAGE_LIST=${GRAPHICAL_PACKAGE_LIST:-./gpackage.list}
_APPLICATIONS=""
while read -r pkg; do
[ -z "$pkg" ] && continue
[ "$(echo "$pkg" | cut -c1)" = "#" ] && continue
_APPLICATIONS="$_APPLICATIONS $pkg"
done < "$PACKAGE_LIST"
if [ "${NO_GRAPHICS:-no}" = "no" ]; then
if [ -f "$GRAPHICAL_PACKAGE_LIST" ]; then
while read -r pkg; do
[ -z "$pkg" ] && continue
[ "$(echo "$pkg" | cut -c1)" = "#" ] && continue
_APPLICATIONS="$_APPLICATIONS $pkg"
done < "$GRAPHICAL_PACKAGE_LIST"
fi
fi
$SUDO $PM $PM_INSTALL $PM_NOCONFIRM $_APPLICATIONS