qubes-linux-template-builder/scripts_fedora/02_install_groups.sh
Marek Marczykowski-Górecki a77a635016 template flavor support (#828)
Set TEMPLATE_FLAVOR variable to select template to build. That type will
be appended to template name.
Actual configuration can vary on template distribution, but generally
config files with suffix "_${TEMPLATE_FLAVOR}" will be used.
2014-05-13 04:40:09 +02:00

27 lines
775 B
Bash
Executable File

#!/bin/sh
if [ -n "${TEMPLATE_FLAVOR}" ]; then
PKGLISTFILE="$SCRIPTSDIR/packages_${DIST}_${TEMPLATE_FLAVOR}.list"
if ! [ -r "${PKGLISTFILE}" ]; then
echo "ERROR: ${PKGLISTFILE} does not exists!"
exit 1
fi
elif [ -r "$SCRIPTSDIR/packages_${DIST}.list" ]; then
PKGLISTFILE="$SCRIPTSDIR/packages_${DIST}.list"
else
PKGLISTFILE="$SCRIPTSDIR/packages.list"
fi
echo "--> Preparing environment..."
mount -t proc proc mnt/proc
export PKGGROUPS=$(cat $PKGLISTFILE)
export YUM0=$PWD/yum_repo_qubes
yum clean all -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR $PKGGROUPS || RETCODE=1
yum update -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR || RETCODE=1
umount mnt/proc
exit $RETCODE