From 30a3514dfe78a377bc9903565a3ca9fd7c51ab91 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 02:23:09 +0100 Subject: [PATCH] create top level hierarchy on mv and move to object to one dir higher Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 4f468e2e..501da620 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -93,8 +93,11 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # 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_object_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...