#!/bin/bash set -e source CONFIG source functions ensure BASE NAME PPA="" UBUNTU="" WITH="" if exists IMAGE_WITH_PPA ; then if [ "${IMAGE_WITH_PPA}" = "1" ]; then PPA="deb [trusted=yes] http://ppa.launchpad.net/llxdev/xenial/ubuntu xenial main" WITH+=" ppa" fi fi if exists IMAGE_WITH_UBUNTU ; then if [ "${IMAGE_WITH_UBUNTU}" = "1" ]; then UBUNTU="deb http://es.archive.ubuntu.com/ubuntu xenial main universe multiverse" WITH+=" ubuntu" fi fi echo "Setting up repos ... ${WITH}" cat > ./${BASE}/${NAME}/etc/apt/sources.list << _EOF deb [trusted=yes] http://lliurex.net/xenial xenial main universe multiverse deb [trusted=yes] http://lliurex.net/xenial xenial-updates main universe multiverse deb [trusted=yes] http://lliurex.net/xenial xenial-security main universe multiverse ${PPA} ${UBUNTU} _EOF rm -f ./${BASE}/${NAME}/etc/apt/sources.list.d/* if [ "$?" != "0" ]; then exit 1 fi exit 0