prefix all variables with __cdist

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-03-29 21:47:05 +02:00
parent 2345d6509b
commit fe159eccb2

View file

@ -25,22 +25,22 @@
[ $# -eq 2 ] || __cdist_usage "<object> <type>" [ $# -eq 2 ] || __cdist_usage "<object> <type>"
set -ue set -ue
object="$1"; shift __cdist_object="$1"; shift
__cdist_gencode_type="$1"; shift __cdist_gencode_type="$1"; shift
if [ ! -d "$(__cdist_object_dir "$object")" ]; then if [ ! -d "$(__cdist_object_dir "$__cdist_object")" ]; then
__cdist_exit_err "Object $object is missing." __cdist_exit_err "Object $__cdist_object is missing."
fi fi
code="$(__cdist_object_code "$object")-${__cdist_gencode_type}" code="$(__cdist_object_code "$__cdist_object")-${__cdist_gencode_type}"
echo "Checking code-${__cdist_gencode_type} for $object ..." echo "Checking code-${__cdist_gencode_type} for $__cdist_object ..."
if [ -e "$code" ]; then if [ -e "$code" ]; then
if [ -f "$code" ]; then if [ -f "$code" ]; then
if [ -x "$code" ]; then if [ -x "$code" ]; then
echo "Executing code-${__cdist_gencode_type} for $object ..." echo "Executing code-${__cdist_gencode_type} for $__cdist_object ..."
"$code" "$code"
else else
__cdist_exit_err "$code exists, but is not executable." __cdist_exit_err "$code exists, but is not executable."
@ -49,5 +49,5 @@ if [ -e "$code" ]; then
__cdist_exit_err "$code exists, but is not a file." __cdist_exit_err "$code exists, but is not a file."
fi fi
else else
__cdist_exit_err "Missing code for ${object}." __cdist_exit_err "Missing code for ${__cdist_object}."
fi fi