Add support for packages that require X.

Checks if xserver-xorg is installed to determine whether
or not to install the 'X' family of packages.
This commit is contained in:
David Tomaschik
2015-09-26 06:52:02 -07:00
parent d809341953
commit f828e32917
3 changed files with 11 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ if [ ! -d $BASEDIR ] ; then
exit 1
fi
HAVE_X=`dpkg-query -s xserver-xorg | grep -c 'Status.*installed'`
function prerequisites {
# Prerequisites require git
if ! which git > /dev/null ; then
@@ -158,6 +160,7 @@ function install_apt_pkgs {
( echo "Can't run apt-get commands" >&2 && \
return 1 )
run_as_root apt-get -y install `cat ${BASEDIR}/packages`
(( $HAVE_X )) && run_as_root apt-get -y install `cat ${BASEDIR}/packages.X`
}