Ensuring that functions are either sources locally or globally, but not both.
This commit is contained in:
parent
f145e20565
commit
ffa9706fc9
|
@ -6,11 +6,18 @@ then
|
||||||
export LIVE_BUILD
|
export LIVE_BUILD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Source global functions
|
for _DIRECTORY in "${LIVE_BUILD}/functions" /usr/share/live/build/functions
|
||||||
for FUNCTION in "${LIVE_BUILD}"/functions/*.sh /usr/share/live/build/functions/*.sh
|
|
||||||
do
|
do
|
||||||
if [ -e "${FUNCTION}" ]
|
if [ -e "${_DIRECTORY}" ]
|
||||||
then
|
then
|
||||||
. "${FUNCTION}"
|
for _FILE in "${_DIRECTORY}"/*.sh
|
||||||
|
do
|
||||||
|
if [ -e "${_FILE}" ]
|
||||||
|
then
|
||||||
|
. "${_FILE}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue