#!/bin/bash # # Copyright (C) 2012 by Michael Olbrich # # See CREDITS for details about who has contributed to this project. # # For further information about the PTXdist project and license conditions # see the README file. # # # find and prepare the config file and any includes # # returns: # 0 if a config file and all includes are ready # 1 otherwise # # array "genimage_configs" contains all config files starting with the # requested file # ptxd_make_image_genimage_config() { local cfg tmp inc local -a includes ptxd_get_alternative config/images "${1}" || ptxd_bailout "could not find config file ${1}" cfg="${ptxd_reply}" tmp="${PTXDIST_TEMPDIR}/$(basename "${1}")" eval \ "${image_env}" \ IMAGE="$(basename "${image_image}")" \ ptxd_replace_magic "${cfg}" > "${tmp}" && genimage_configs[${#genimage_configs[@]}]="${tmp}" && echo "${image_image}: \$(call genimage/config, ${1})" >> "${pkg_genimage_deps}" includes=( $(sed -n "s/.*\