add --onchange, fix shellcheck

This commit is contained in:
ander 2021-07-07 21:23:25 +03:00
parent 485283f2e5
commit 7a5896acfa
No known key found for this signature in database
GPG key ID: 0A2971E562D618F3
3 changed files with 12 additions and 1 deletions

View file

@ -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

View file

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

View file

@ -1 +1,2 @@
file
onchange