forked from ungleich-public/cdist
		
	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
				
			
		|  | @ -18,29 +18,24 @@ | |||
| # along with cdist. If not, see <http://www.gnu.org/licenses/>. | ||||
| # | ||||
| #  | ||||
| # For each created object create the code to be executed on the | ||||
| # target. | ||||
| # For each created object create the code to be executed on the target. | ||||
| # | ||||
| 
 | ||||
| . cdist-config | ||||
| 
 | ||||
| if [ $# -ne 2 ]; then | ||||
|    __cdist_usage "<target host> <object_base_dir>" | ||||
| fi | ||||
| [ $# -eq 1 ] || __cdist_usage "<target host>" | ||||
| 
 | ||||
| set -eu | ||||
| 
 | ||||
| __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 | ||||
|    code="$(__cdist_object_code "$object")" | ||||
|    echo "Generating  code  for $object ..." | ||||
| 
 | ||||
|    cdist-object-gencode "$__cdist_target_host"     \ | ||||
|                         "$__cdist_object_base_dir" \ | ||||
|                         "$__cdist_out_object_dir" \ | ||||
|                         "$object" > "${code}" | ||||
| 
 | ||||
|    chmod u+x "${code}" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue