forked from ungleich-public/cdist
allow parameters to be missing, if not used
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
dc2a49afe8
commit
e1a5a26cbf
2 changed files with 26 additions and 11 deletions
|
|
@ -207,6 +207,17 @@ __cdist_type_parameter_file()
|
|||
echo "$(__cdist_type_parameter_dir "$1")/$2"
|
||||
}
|
||||
|
||||
# Shorthand for required and optional
|
||||
__cdist_type_parameter_required()
|
||||
{
|
||||
__cdist_type_parameter_file "$1/$__cdist_name_parameter_required"
|
||||
}
|
||||
|
||||
__cdist_type_parameter_optional()
|
||||
{
|
||||
__cdist_type_parameter_file "$1/$__cdist_name_parameter_optional"
|
||||
}
|
||||
|
||||
__cdist_type_from_object()
|
||||
{
|
||||
echo "${1%%/*}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue