write to explorer name

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-23 18:24:51 +01:00
parent 609b92b661
commit f58f1c91e4

View file

@ -47,6 +47,8 @@ fi
# Execute all explorers # Execute all explorers
for explorer in "$__cdist_explorer_dir/"*; do for explorer in "$__cdist_explorer_dir/"*; do
explorer_name="${explorer##*/}"
if [ -f "$explorer" ]; then if [ -f "$explorer" ]; then
if [ ! -x "$explorer" ]; then if [ ! -x "$explorer" ]; then
echo "Explorer \"$explorer\" exists, but is not executable." echo "Explorer \"$explorer\" exists, but is not executable."
@ -54,7 +56,7 @@ for explorer in "$__cdist_explorer_dir/"*; do
fi fi
# Execute explorers and save results in remote destination directory # Execute explorers and save results in remote destination directory
"$explorer" "$@" > "${__cdist_my_out_dir}" "$explorer" "$@" > "${__cdist_my_out_dir}/$explorer_name"
else else
if [ -e "$explorer" ]; then if [ -e "$explorer" ]; then
echo "Explorer \"$explorer\" exists, but is not a file." echo "Explorer \"$explorer\" exists, but is not a file."