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:
parent
8a76143e33
commit
e921986e32
1 changed files with 7 additions and 1 deletions
|
@ -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")"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue