create __cdist_object_id_from_object and use it + __cdist_type_from_object in cdist-manifest-run-all
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
51669874a7
commit
a12df5ce7c
2 changed files with 7 additions and 2 deletions
|
@ -160,6 +160,11 @@ __cdist_type_from_object()
|
||||||
echo "${1%%/*}"
|
echo "${1%%/*}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__cdist_object_id_from_object()
|
||||||
|
{
|
||||||
|
echo "${1#*/}"
|
||||||
|
}
|
||||||
|
|
||||||
__cdist_object_arg()
|
__cdist_object_arg()
|
||||||
{
|
{
|
||||||
local arg="$1"; shift
|
local arg="$1"; shift
|
||||||
|
|
|
@ -53,12 +53,12 @@ while [ "$__cdist_new_objects_created" = "y" ]; do
|
||||||
# Full path to current object
|
# Full path to current object
|
||||||
__cdist_cur_object_dir="$__cdist_object_base_dir/$__cdist_object"
|
__cdist_cur_object_dir="$__cdist_object_base_dir/$__cdist_object"
|
||||||
# Only the id
|
# Only the id
|
||||||
__cdist_object_id="${__cdist_object#*/}"
|
__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")"
|
||||||
|
|
||||||
if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then
|
if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then
|
||||||
echo "Working on object ${__cdist_object} ..."
|
echo "Working on object ${__cdist_object} ..."
|
||||||
|
|
||||||
__cdist_type="${__cdist_object%%/*}"
|
__cdist_type="$(__cdist_type_from_object "$__cdist_object")"
|
||||||
__cdist_manifest="$__cdist_type_dir/${__cdist_type}/${__cdist_name_manifest}"
|
__cdist_manifest="$__cdist_type_dir/${__cdist_type}/${__cdist_name_manifest}"
|
||||||
echo $__cdist_manifest
|
echo $__cdist_manifest
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue