mirror of
https://github.com/opnsense/tools.git
synced 2026-06-09 08:55:26 -04:00
build: remove side effect from list_config()
Function returns output nowadays, no need to return cached result if already set. Fixes AUXLIST handling in ports step.
This commit is contained in:
parent
da3cbc263e
commit
968e273e06
2 changed files with 3 additions and 13 deletions
|
|
@ -1211,16 +1211,6 @@ ${PLUGINSDIR}
|
|||
|
||||
list_config()
|
||||
{
|
||||
eval LIST_ENV="\${${1}LIST}"
|
||||
shift
|
||||
|
||||
if [ -n "${LIST_ENV}" ]; then
|
||||
for LIST_ORIGIN in ${LIST_ENV}; do
|
||||
echo ${LIST_ORIGIN}
|
||||
done
|
||||
return
|
||||
fi
|
||||
|
||||
cat ${@} | while read LIST_ORIGIN LIST_IGNORE; do
|
||||
eval LIST_ORIGIN=${LIST_ORIGIN}
|
||||
if [ "$(echo ${LIST_ORIGIN} | colrm 2)" = "#" ]; then
|
||||
|
|
@ -1243,12 +1233,12 @@ list_ports()
|
|||
{
|
||||
local LIST_MATCH=1
|
||||
|
||||
list_config PORTS ${@}
|
||||
list_config ${@}
|
||||
}
|
||||
|
||||
list_plugins()
|
||||
{
|
||||
local LIST_MATCH=1
|
||||
|
||||
list_config PLUGINS ${@}
|
||||
list_config ${@}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ FROM=FreeBSD
|
|||
|
||||
. ./common.sh
|
||||
|
||||
PORTSLIST=$(list_config PORTS ${CONFIGDIR}/skim.conf ${CONFIGDIR}/aux.conf \
|
||||
PORTSLIST=$(list_config ${CONFIGDIR}/skim.conf ${CONFIGDIR}/aux.conf \
|
||||
${CONFIGDIR}/ports.conf)
|
||||
|
||||
DIFF="$(which colordiff 2> /dev/null || echo cat)"
|
||||
|
|
|
|||
Loading…
Reference in a new issue