forked from ungleich-public/cdist
add --onchange, fix shellcheck
This commit is contained in:
parent
485283f2e5
commit
7a5896acfa
3 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -22,6 +22,9 @@ OPTIONAL PARAMETERS
|
|||
file
|
||||
TODO
|
||||
|
||||
onchange
|
||||
TODO
|
||||
|
||||
|
||||
BOOLEAN PARAMETERS
|
||||
------------------
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
file
|
||||
onchange
|
||||
|
|
Loading…
Reference in a new issue