simplified family configuration

This commit is contained in:
2014-05-05 14:18:13 +02:00
parent 0ab9b60148
commit 90c5d6958b
27 changed files with 8 additions and 29 deletions

View File

@@ -195,28 +195,22 @@ function _load_build_dependencies() {
done
}
function em.load_family() {
function em.add_to_family() {
if [[ -z ${1} ]]; then
printf "${FUNCNAME}: Missing family argument"
exit 42
die 42 "${FUNCNAME}: Missing family argument."
fi
if [[ ! -d ${EM_ETCDIR}/${1} ]]; then
printf "${FUNCNAME}: ${1}: family does not exist."
exit 42
dir 43 "${1}: family does not exist."
fi
for f in "${CONFIG_DIR}/${1}.d/"*.conf; do
EM_FAMILY=$1
source "${CONFIG_DIR}/versions.conf"
for f in "${CONFIG_DIR}/families.d/"*.conf; do
source "${f}"
done
eval ${ENVIRONMENT_ARGS}
}
function em.add_to_family() {
EM_FAMILY=$1
source "${CONFIG_DIR}/versions.conf"
em.load_family "$1"
}
function em.set_runtime_dependencies() {
EM_DEPENDENCIES=("$@")
}