[cdist #3] update for multiple optional

This commit is contained in:
elf 2020-05-09 03:19:37 +09:00
parent 6d8a54a1b5
commit 570de91100
3 changed files with 6 additions and 5 deletions

View File

@ -2,6 +2,6 @@ case "$__target_host" in
# Everybody has this # Everybody has this
localhost) localhost)
#__my_computer #__my_computer
__colourful_file __colourful_file test --colour test1 --colour test2
;; ;;
esac esac

View File

@ -4,7 +4,8 @@ DOMAIN_NAME="$__object_id"
COLOUR=$(cat "$__object/parameter/colour") COLOUR=$(cat "$__object/parameter/colour")
__file ~/colourful \ if [ -f "$__object/parameter/colour" ]; then
--mode 0644 --source - <<EOF for col in $(cat $__object/parameter/colour); do
colour=$COLOUR echo "colour="$col >> ~/colourful
EOF done
fi