Merge remote branch 'nico/master'

This commit is contained in:
Steven Armstrong 2011-02-22 13:14:59 +01:00
commit 62c9d0bad9
2 changed files with 10 additions and 14 deletions

View file

@ -44,15 +44,11 @@ gencode="$(__cdist_type_gencode "$__cdist_type")"
cd "$__cdist_object_dir" cd "$__cdist_object_dir"
# Call gencode of type with __cdist_object
if [ -x "$gencode" ]; then
# Prepend header to each script
cat << eof cat << eof
# #
# Code imported from $gencode # The following code is imported from output of $gencode
# #
eof eof
__cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" [ -x "$gencode" ] || __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id"
fi

View file

@ -22,13 +22,14 @@
# example for typewrites later # example for typewrites later
# #
. cdist-config
pwd -P >&2
ls >&2
type="$(cat type)" type="$(cat type)"
path="$(cat destination)"
# If destination was specified, do not use the id
if [ -f destination ]; then
destination="$(cat destination)"
else
destination="$1"
fi
case "$type" in case "$type" in
directory) directory)
@ -43,7 +44,6 @@ case "$type" in
echo "Unsupported type: \"$type\"" >&2 echo "Unsupported type: \"$type\"" >&2
exit 1 exit 1
;; ;;
esac esac
if [ -f mode ]; then if [ -f mode ]; then