argc == 1 for cdist-object-gencode-all
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								82cac6f3d8
							
						
					
				
			
			
				commit
				
					
						7e713f1b22
					
				
			
		
					 2 changed files with 5 additions and 12 deletions
				
			
		| 
						 | 
					@ -50,9 +50,7 @@ cdist-explorer-run-global     "$__cdist_target_host"
 | 
				
			||||||
cdist-manifest-run-init       "$__cdist_target_host"
 | 
					cdist-manifest-run-init       "$__cdist_target_host"
 | 
				
			||||||
cdist-manifest-run-all        "$__cdist_target_host"
 | 
					cdist-manifest-run-all        "$__cdist_target_host"
 | 
				
			||||||
cdist-object-explorer-all     "$__cdist_target_host"
 | 
					cdist-object-explorer-all     "$__cdist_target_host"
 | 
				
			||||||
 | 
					cdist-object-gencode-all      "$__cdist_target_host"
 | 
				
			||||||
# Generate code for all objects
 | 
					 | 
				
			||||||
cdist-object-gencode-all      "$__cdist_target_host" "$__cdist_out_object_dir"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Transfer all objects including code
 | 
					# Transfer all objects including code
 | 
				
			||||||
cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \
 | 
					cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,29 +18,24 @@
 | 
				
			||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
 | 
					# along with cdist. If not, see <http://www.gnu.org/licenses/>.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# 
 | 
					# 
 | 
				
			||||||
# For each created object create the code to be executed on the
 | 
					# For each created object create the code to be executed on the target.
 | 
				
			||||||
# target.
 | 
					 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
. cdist-config
 | 
					. cdist-config
 | 
				
			||||||
 | 
					[ $# -eq 1 ] || __cdist_usage "<target host>"
 | 
				
			||||||
if [ $# -ne 2 ]; then
 | 
					 | 
				
			||||||
   __cdist_usage "<target host> <object_base_dir>"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
set -eu
 | 
					set -eu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
__cdist_target_host="$1"; shift
 | 
					__cdist_target_host="$1"; shift
 | 
				
			||||||
__cdist_object_base_dir="$1"; shift
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file"
 | 
					__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
while read object; do
 | 
					while read object; do
 | 
				
			||||||
   code="$(__cdist_object_code "$object")"
 | 
					   code="$(__cdist_object_code "$object")"
 | 
				
			||||||
   echo "Generating  code  for $object ..."
 | 
					   echo "Generating  code  for $object ..."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   cdist-object-gencode "$__cdist_target_host"     \
 | 
					   cdist-object-gencode "$__cdist_target_host"     \
 | 
				
			||||||
                        "$__cdist_object_base_dir" \
 | 
					                        "$__cdist_out_object_dir" \
 | 
				
			||||||
                        "$object" > "${code}"
 | 
					                        "$object" > "${code}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   chmod u+x "${code}"
 | 
					   chmod u+x "${code}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue