cleanup cdist-explorer-run-init, export __explorers to general explorers

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-24 14:51:49 +01:00
commit 212260b46d
3 changed files with 13 additions and 15 deletions

View file

@ -25,23 +25,23 @@
#
. cdist-config
if [ $# -lt 4 ]; then
__cdist_usage "<work dir> <explorer dir> <variable name> <out dir> [explorer args]"
if [ $# -lt 3 ]; then
__cdist_usage "<variable name> <explorer dir> <out dir> [explorer args]"
fi
set -ue
# cd to this dir
__cdist_work_dir="$1"; shift
# Find explorers here
__cdist_explorer_dir="$1"; shift
# Variable that defines the home of the explorers
__cdist_variable_name="$1"; shift
# Find explorers here
__cdist_explorer_dir="$1"; shift
# Write output here
__cdist_my_out_dir="$1"; shift
# cd to this dir
__cdist_work_dir="$__cdist_remote_base_dir"
# Setup environment
eval export $__cdist_variable_name=\"$__cdist_explorer_dir\"
cd "${__cdist_work_dir}"
@ -53,8 +53,6 @@ if [ "$num" -lt 1 ]; then
__cdist_exit_err "${__cdist_explorer_dir}: Contains no explorers"
fi
# Setup environment for explorer
# Execute all explorers
for explorer in "$__cdist_explorer_dir/"*; do
explorer_name="${explorer##*/}"