introduce new variable names and use __explorers

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-24 14:24:47 +01:00
commit f5eccb2cb1
7 changed files with 41 additions and 11 deletions

View file

@ -31,22 +31,32 @@ __cdist_object_base_dir="$1"; shift
################################################################################
# New code
#
object_listing="$__cdist_tmp_dir/objects"
type_listing_all="$__cdist_tmp_dir/types_all"
type_listing="$__cdist_tmp_dir/types"
# Get listing of objects
__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file"
# Get listing of types used
while read object; do
echo "$(__cdist_type_from_object "$object")" >> "$type_listing_all"
done < "$__cdist_tmp_file"
sort "$type_listing_all" | uniq > "$type_listing"
cat "$type_listing"
# For every type that has explorers, Transfer the explorers
# For every object of a type that has explorers, execute the explorers
# and retrieve the results
exit 1
################################################################################
# Old code
#
__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file"
# need to create pseudo array, as ssh in cdist-explorer-run will destroy while-read loops
while read object; do
set -- "$@" "$object"