|
|
|
@ -55,28 +55,41 @@ else |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
################################################################################ |
|
|
|
|
# Verify object |
|
|
|
|
# Internal quirks |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
# Append id for error messages |
|
|
|
|
__cdist_myname="$__cdist_myname ($__cdist_object_id)" |
|
|
|
|
|
|
|
|
|
################################################################################ |
|
|
|
|
# Create object in tmpdir |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
__cdist_new_object_dir="$__cdist_tmp_dir/$__cdist_object_self" |
|
|
|
|
mkdir -p "${__cdist_new_object_dir}" |
|
|
|
|
|
|
|
|
|
# Record source |
|
|
|
|
echo "${__cdist_manifest}" > "${__cdist_new_object_dir}/${__cdist_name_object_source}" |
|
|
|
|
|
|
|
|
|
__cdist_ddir="$(__cdist_object_dir "$__cdist_object")" |
|
|
|
|
__cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" |
|
|
|
|
|
|
|
|
|
# Append id for error messages |
|
|
|
|
__cdist_myname="$__cdist_myname ($__cdist_object_id)" |
|
|
|
|
|
|
|
|
|
# if [ -e "${__cdist_ddir}" ]; then |
|
|
|
|
# source="$(__cdist_object_source "${__cdist_ddir}")" |
|
|
|
|
################################################################################ |
|
|
|
|
# Try to merge object into global object directory |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
# |
|
|
|
|
__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" |
|
|
|
|
__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" |
|
|
|
|
|
|
|
|
|
__cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" |
|
|
|
|
|
|
|
|
|
# if [ -e "${__cdist_new_object_dir}" ]; then |
|
|
|
|
# source="$(__cdist_object_source "${__cdist_new_object_dir}")" |
|
|
|
|
# __cdist_exit_err "${__cdist_object} already exists (source: $source)" |
|
|
|
|
# fi |
|
|
|
|
|
|
|
|
|
mkdir -p "${__cdist_ddir}" |
|
|
|
|
mkdir -p "${__cdist_parameter_dir}" |
|
|
|
|
|
|
|
|
|
# Record (correct ;-) source |
|
|
|
|
echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" |
|
|
|
|
|
|
|
|
|
# Record parameters to tmpdir |
|
|
|
|
tempparameter="${__cdist_tmp_dir}/${__cdist_name_parameter}" |
|
|
|
|
mkdir -p "$tempparameter" |
|
|
|
|