seperate loading from execution

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2010-09-30 19:08:51 +02:00
parent 9813c38657
commit c24cf52ce4

View file

@ -23,12 +23,17 @@
find "${CDIST_LIBDIR}" -type f -name cdist_explore\*.sh > "${CDIST_TMP}"
# first load all functions
while read funcfull; do
sh="${funcfull##*/}"
func="${sh%.sh}"
var="__$func"
cat "${funcfull}"
done < "${CDIST_TMP}"
# then execute functions
while read funcfull; do
echo "$var=\"\$($func)\""
echo "echo $var=\\\"\$$var\\\""
done < "${CDIST_TMP}"