forked from ungleich-public/cdist
		
	clearify what to move
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								3d0cdfb7c3
							
						
					
				
			
			
				commit
				
					
						7525e82ce4
					
				
			
		
					 1 changed files with 17 additions and 7 deletions
				
			
		|  | @ -89,16 +89,26 @@ while [ "$__cdist_new_objects_created" = "y"  ]; do | ||||||
|                 |                 | ||||||
|                # where to save the newly created object |                # where to save the newly created object | ||||||
|                __cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object" |                __cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object" | ||||||
|  |                mkdir -p "$__cdist_object_dir" | ||||||
| 
 | 
 | ||||||
|                # Create top directory |                # Move parts of the object (CANNOT MOVE COMPLETLEY, HIERACHY!) | ||||||
|                __cdist_object_top_dir=${__cdist_object_dir%/*} |                __cdist_new_object_dir="$__cdist_new_objects_dir/$__cdist_new_object" | ||||||
|                mkdir -p "$__cdist_object_top_dir" |  | ||||||
| 
 | 
 | ||||||
|                # Source of the new object |                # Source | ||||||
|                __cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object" |                mv "${__cdist_new_object_dir}/${__cdist_name_object_source}" \ | ||||||
|  |                   "$__cdist_object_dir" | ||||||
| 
 | 
 | ||||||
|                # Move object, not only parts |                # Parameter | ||||||
|                mv "${__cdist_new_object_dir}/" "$__cdist_object_top_dir" |                if [ -d "${__cdist_new_object_dir}/${__cdist_name_parameter}" ]; then | ||||||
|  |                   mv "${__cdist_new_object_dir}/${__cdist_name_parameter}" \ | ||||||
|  |                   "$__cdist_object_dir" | ||||||
|  |                fi | ||||||
|  | 
 | ||||||
|  |                # Explorer | ||||||
|  |                if [ -d "${__cdist_new_object_dir}/${__cdist_name_explorer}" ]; then | ||||||
|  |                   mv "${__cdist_new_object_dir}/${__cdist_name_explorer}" \ | ||||||
|  |                   "$__cdist_object_dir" | ||||||
|  |                fi | ||||||
|             done < "$__cdist_new_objects_list" |             done < "$__cdist_new_objects_list" | ||||||
| 
 | 
 | ||||||
|             # Remove listing and objects, otherwise the next type will reuse it... |             # Remove listing and objects, otherwise the next type will reuse it... | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue