Browse Source

add --onchange, fix shellcheck

ander/__sed
ander 1 year ago
parent
commit
7a5896acfa
No known key found for this signature in database
GPG Key ID: A2971E562D618F3
  1. 9
      cdist/conf/type/__sed/gencode-remote
  2. 3
      cdist/conf/type/__sed/man.rst
  3. 1
      cdist/conf/type/__sed/parameter/optional

9
cdist/conf/type/__sed/gencode-remote vendored

@ -32,6 +32,7 @@ if ! echo "$script" \
| diff "$file_from_target" - \
> /dev/null
then
# shellcheck disable=SC2016
echo 'tmp="$( mktemp )"'
echo "$sed_cmd -f - '$file' > \"\$tmp\" << EOF"
@ -41,6 +42,12 @@ then
echo 'EOF'
echo "cp \"\$tmp\" '$file'"
# shellcheck disable=SC2016
echo 'rm -f "$tmp"'
if [ -f "$__object/parameter/onchange" ]
then
cat "$__object/parameter/onchange"
fi
fi

3
cdist/conf/type/__sed/man.rst vendored

@ -22,6 +22,9 @@ OPTIONAL PARAMETERS
file
TODO
onchange
TODO
BOOLEAN PARAMETERS
------------------

1
cdist/conf/type/__sed/parameter/optional vendored

@ -1 +1,2 @@
file
onchange

Loading…
Cancel
Save