remove double slash in __cdist_object in bin/cdist-type-emulator

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-03-22 08:57:19 +01:00
parent 8a76143e33
commit e921986e32

View file

@ -40,7 +40,13 @@ fi
echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \
__cdist_usage "Insane object id, ${__cdist_object_id}." __cdist_usage "Insane object id, ${__cdist_object_id}."
# Remove double slash if id begins with /
if [ "$(echo $__cdist_object_id | grep "^/")" ]; then
__cdist_object="${__cdist_type}${__cdist_object_id}"
else
__cdist_object="${__cdist_type}/${__cdist_object_id}" __cdist_object="${__cdist_type}/${__cdist_object_id}"
fi
__cdist_ddir="$(__cdist_object_dir "$__cdist_object")" __cdist_ddir="$(__cdist_object_dir "$__cdist_object")"
__cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" __cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")"