forked from ungleich-public/cdist
cleanup cdist-explorer-run-init, export __explorers to general explorers
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
368eed50c1
commit
212260b46d
3 changed files with 13 additions and 15 deletions
|
|
@ -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##*/}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue