sed -i 's/__cdist_name_type_params/__cdist_name_params/g'
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
b222b79407
commit
ce69491c34
2 changed files with 7 additions and 7 deletions
|
@ -44,9 +44,9 @@ set -u
|
||||||
: ${__cdist_name_object:=objects}
|
: ${__cdist_name_object:=objects}
|
||||||
|
|
||||||
: ${__cdist_name_type:=types}
|
: ${__cdist_name_type:=types}
|
||||||
: ${__cdist_name_type_params:=parameters}
|
: ${__cdist_name_params:=parameters}
|
||||||
: ${__cdist_name_type_params_required:=required}
|
: ${__cdist_name_params_required:=required}
|
||||||
: ${__cdist_name_type_params_optional:=optional}
|
: ${__cdist_name_params_optional:=optional}
|
||||||
|
|
||||||
# Name of the executable generated
|
# Name of the executable generated
|
||||||
: ${__cdist_name_exec:=exec}
|
: ${__cdist_name_exec:=exec}
|
||||||
|
@ -152,7 +152,7 @@ __cdist_type_param_file()
|
||||||
local type="$1"; shift
|
local type="$1"; shift
|
||||||
local paramtype="$1"; shift
|
local paramtype="$1"; shift
|
||||||
|
|
||||||
echo "${__cdist_type_dir}/$type/$__cdist_name_type_params/$paramtype"
|
echo "${__cdist_type_dir}/$type/$__cdist_name_params/$paramtype"
|
||||||
}
|
}
|
||||||
|
|
||||||
__cdist_type_from_object()
|
__cdist_type_from_object()
|
||||||
|
|
|
@ -51,7 +51,7 @@ mkdir -p "${__cdist_ddir}"
|
||||||
echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}"
|
echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}"
|
||||||
|
|
||||||
# Record parameters to subdir
|
# Record parameters to subdir
|
||||||
tempparams="${__cdist_tmp_dir}/${__cdist_name_type_params}"
|
tempparams="${__cdist_tmp_dir}/${__cdist_name_params}"
|
||||||
mkdir -p "$tempparams"
|
mkdir -p "$tempparams"
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
|
@ -76,14 +76,14 @@ while read required; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv "${tempparams}/${required}" "${__cdist_ddir}"
|
mv "${tempparams}/${required}" "${__cdist_ddir}"
|
||||||
done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_type_params_required")"
|
done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_params_required")"
|
||||||
|
|
||||||
# Allow optional parameters
|
# Allow optional parameters
|
||||||
while read optional; do
|
while read optional; do
|
||||||
if [ -f "${tempparams}/${optional}" ]; then
|
if [ -f "${tempparams}/${optional}" ]; then
|
||||||
mv "${tempparams}/${optional}" "${__cdist_ddir}"
|
mv "${tempparams}/${optional}" "${__cdist_ddir}"
|
||||||
fi
|
fi
|
||||||
done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_type_params_optional")"
|
done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_params_optional")"
|
||||||
|
|
||||||
# Error out on other paramaters
|
# Error out on other paramaters
|
||||||
cd "${tempparams}"
|
cd "${tempparams}"
|
||||||
|
|
Loading…
Reference in a new issue