dotfiles/scripts/20-install-pkgs.sh

24 lines
675 B
Bash
Raw Normal View History

2023-02-19 21:02:08 +01:00
#!/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 [ "${GRAPHICAL:-no}" = "yes" ]; 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