Centraly evaluate LH_CONFIG for custom configuration file.

This commit is contained in:
Daniel Baumann 2008-04-07 12:01:37 +02:00
parent e79e733e49
commit af3aebda73
1 changed files with 9 additions and 4 deletions

View File

@ -11,10 +11,15 @@ set -e
Read_conffile ()
{
FILES="${1} ${1}.${LH_ARCHITECTURE} ${1}.${DISTRIBUTION}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||')"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${ARCHITECTURE}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${DISTRIBUTION}"
if [ -n "${LH_CONFIG}" ]
then
FILES="${LH_CONFIG}"
else
FILES="${1} ${1}.${LH_ARCHITECTURE} ${1}.${DISTRIBUTION}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||')"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${ARCHITECTURE}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${DISTRIBUTION}"
fi
for FILE in ${FILES}
do