From 3d0cdfb7c3163bacd215946f1de38672c1e28dec Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 02:26:52 +0100 Subject: [PATCH] move to correct top dir, not to itself Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 059d829f..89ec0668 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -90,14 +90,15 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # where to save the newly created object __cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object" + # Create top directory + __cdist_object_top_dir=${__cdist_object_dir%/*} + mkdir -p "$__cdist_object_top_dir" + # Source of the new object __cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object" - # Create top directory - __cdist_new_object_top_dir=${__cdist_new_object_dir%/*} - # Move object, not only parts - mv "${__cdist_new_object_dir}/" "$__cdist_new_object_top_dir" + mv "${__cdist_new_object_dir}/" "$__cdist_object_top_dir" done < "$__cdist_new_objects_list" # Remove listing and objects, otherwise the next type will reuse it...