diff options
author | Daniel Baumann <daniel@debian.org> | 2008-04-07 12:04:35 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:31 +0100 |
commit | 0466a3bda47a07e72e40648e5318567af389364c (patch) | |
tree | c75083cc244f1e9a1d506d5e1f73062a164660f9 /functions | |
parent | 705a4178e75ffc190acf2fa914a6cd1519fdae87 (diff) | |
download | live-build-0466a3bda47a07e72e40648e5318567af389364c.zip live-build-0466a3bda47a07e72e40648e5318567af389364c.tar.gz |
Allowing multiple arguments for Read_conffile();.
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/conffile.sh | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/functions/conffile.sh b/functions/conffile.sh index 17121b8..4c233a0 100755 --- a/functions/conffile.sh +++ b/functions/conffile.sh @@ -15,22 +15,25 @@ Read_conffile () 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}" + for FILE in ${@} + do + FILES="${FILE} ${FILE}.${LH_ARCHITECTURE} ${FILE}.${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}" + done fi - for FILE in ${FILES} + for CONFFILE in ${FILES} do - if [ -f "${FILE}" ] + if [ -f "${CONFFILE}" ] then - if [ -r "${FILE}" ] + if [ -r "${CONFFILE}" ] then - Echo_debug "Reading configuration file ${FILE}" - . "${FILE}" + Echo_debug "Reading configuration file ${CONFFILE}" + . "${CONFFILE}" else - Echo_warning "Failed to read configuration file ${FILE}" + Echo_warning "Failed to read configuration file ${CONFFILE}" fi fi done |