forked from ungleich-public/cdist
		
	fixes + local and remote gencode
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								0e42e98bb9
							
						
					
				
			
			
				commit
				
					
						10ebdd87d4
					
				
			
		
					 1 changed files with 20 additions and 8 deletions
				
			
		| 
						 | 
					@ -26,11 +26,11 @@
 | 
				
			||||||
set -eu
 | 
					set -eu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
__cdist_type="$1"; shift
 | 
					__cdist_type="$1"; shift
 | 
				
			||||||
__cdist_type_dir="$(__cdist_type_dir "$__cdist_type")"
 | 
					__cdist_my_type_dir="$(__cdist_type_dir "$__cdist_type")"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Creating type $__cdist_type in $__cdist_type_dir ..."
 | 
					echo "Creating type $__cdist_type in $__cdist_my_type_dir ..."
 | 
				
			||||||
# Base
 | 
					# Base
 | 
				
			||||||
mkdir -p "$__cdist_type_dir"
 | 
					mkdir -p "$__cdist_my_type_dir"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Parameter
 | 
					# Parameter
 | 
				
			||||||
mkdir -p "$(__cdist_type_parameter_dir "$__cdist_type")"
 | 
					mkdir -p "$(__cdist_type_parameter_dir "$__cdist_type")"
 | 
				
			||||||
| 
						 | 
					@ -38,11 +38,11 @@ touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_re
 | 
				
			||||||
touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_optional}"
 | 
					touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_optional}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Manifest
 | 
					# Manifest
 | 
				
			||||||
cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_manifest}"
 | 
					cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$__cdist_my_type_dir/${__cdist_name_manifest}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This is the manifest, which can be used to create other objects like this:
 | 
					# This is the manifest, which can be used to create other objects like this:
 | 
				
			||||||
# __file /path/to/destination --source /from/where/ --type file
 | 
					# __file /path/to/destination --source /from/where/
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# To tell cdist to make use of it, you need to make it executable (chmod +x)
 | 
					# To tell cdist to make use of it, you need to make it executable (chmod +x)
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
| 
						 | 
					@ -50,8 +50,8 @@ cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
eof
 | 
					eof
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Gencode
 | 
					# Gencode remote
 | 
				
			||||||
cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}"
 | 
					cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}-${__cdist_name_gencode_remote}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# This file should generate code on stdout, which will be collected by cdist
 | 
					# This file should generate code on stdout, which will be collected by cdist
 | 
				
			||||||
| 
						 | 
					@ -63,5 +63,17 @@ cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cd
 | 
				
			||||||
 | 
					
 | 
				
			||||||
eof
 | 
					eof
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}-${__cdist_name_gencode_local}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# This file should generate code on stdout, which will be collected by cdist
 | 
				
			||||||
 | 
					# and run on the same machine cdist-deploy-to is executed.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# To tell cdist to make use of it, you need to make it executable (chmod +x)
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					eof
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Explorer
 | 
					# Explorer
 | 
				
			||||||
mkdir -p "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_explorer}"
 | 
					mkdir -p "$__cdist_my_type_dir/${__cdist_name_explorer}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue