diff options
author | Daniel Baumann <daniel@debian.org> | 2012-12-04 12:47:40 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-12-04 12:47:40 +0100 |
commit | 19d695c05afcaffddd9a8629cfd8aeacd3fb8425 (patch) | |
tree | fb9c9dfe8ef4bf2140abe3a5d21e75609c2f4b74 /scripts/build.sh | |
parent | 6a206425e8400fddb362c013d70024e834e8b1a4 (diff) | |
download | vyos-live-build-19d695c05afcaffddd9a8629cfd8aeacd3fb8425.tar.gz vyos-live-build-19d695c05afcaffddd9a8629cfd8aeacd3fb8425.zip |
Ensuring that functions are either sources locally or globally, but not both.
Diffstat (limited to 'scripts/build.sh')
-rwxr-xr-x | scripts/build.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/build.sh b/scripts/build.sh index 21ff520d8..2e4a79ec8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -6,11 +6,18 @@ then export LIVE_BUILD fi -# Source global functions -for FUNCTION in "${LIVE_BUILD}"/functions/*.sh /usr/share/live/build/functions/*.sh +for _DIRECTORY in "${LIVE_BUILD}/functions" /usr/share/live/build/functions do - if [ -e "${FUNCTION}" ] + if [ -e "${_DIRECTORY}" ] then - . "${FUNCTION}" + for _FILE in "${_DIRECTORY}"/*.sh + do + if [ -e "${_FILE}" ] + then + . "${_FILE}" + fi + done + + break fi done |