forked from ungleich-public/cdist
seperate loading from execution
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
9813c38657
commit
c24cf52ce4
1 changed files with 5 additions and 0 deletions
|
@ -23,12 +23,17 @@
|
||||||
|
|
||||||
find "${CDIST_LIBDIR}" -type f -name cdist_explore\*.sh > "${CDIST_TMP}"
|
find "${CDIST_LIBDIR}" -type f -name cdist_explore\*.sh > "${CDIST_TMP}"
|
||||||
|
|
||||||
|
# first load all functions
|
||||||
while read funcfull; do
|
while read funcfull; do
|
||||||
sh="${funcfull##*/}"
|
sh="${funcfull##*/}"
|
||||||
func="${sh%.sh}"
|
func="${sh%.sh}"
|
||||||
var="__$func"
|
var="__$func"
|
||||||
|
|
||||||
cat "${funcfull}"
|
cat "${funcfull}"
|
||||||
|
done < "${CDIST_TMP}"
|
||||||
|
|
||||||
|
# then execute functions
|
||||||
|
while read funcfull; do
|
||||||
echo "$var=\"\$($func)\""
|
echo "$var=\"\$($func)\""
|
||||||
echo "echo $var=\\\"\$$var\\\""
|
echo "echo $var=\\\"\$$var\\\""
|
||||||
done < "${CDIST_TMP}"
|
done < "${CDIST_TMP}"
|
||||||
|
|
Loading…
Reference in a new issue