live-systems.org/gitweb
/
live-build.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a20642
)
Ensuring that functions are either sources locally or globally, but not both.
author
Daniel Baumann
<daniel@debian.org>
Tue, 4 Dec 2012 11:47:40 +0000
(12:47 +0100)
committer
Daniel Baumann
<daniel@debian.org>
Tue, 4 Dec 2012 11:47:40 +0000
(12:47 +0100)
scripts/build.sh
patch
|
blob
|
blame
|
history
diff --git
a/scripts/build.sh
b/scripts/build.sh
index
21ff520
..
2e4a79e
100755
(executable)
--- 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