resolved #444 add messaging to __line-type (#580)

#444 Add messaging to __line-type
This commit is contained in:
tom 2017-09-27 12:19:07 +02:00 committed by Darko Poljak
parent e5881301ad
commit 7ee56d099f
2 changed files with 11 additions and 2 deletions

View File

@ -60,6 +60,7 @@ case "$state_should" in
# Only replace ' with '"'"' and keep \ as they are
line_sanitised=$(cat "$__object/parameter/line" | sed -e "s/'/'\"'\"'/g")
printf '%s' "printf '%s\n' '$line_sanitised' >> $file"
echo "added" >> "$__messages_out"
;;
absent)
@ -83,9 +84,10 @@ fi
grep -v $greparg '$regex' '$file' > \$tmpfile || true
mv -f "\$tmpfile" "$file"
eof
echo "removed" >> "$__messages_out"
;;
*)
echo "Unknown state: $state_should" >&2
exit 1
echo "Unknown state: $state_should" >&2
exit 1
;;
esac

View File

@ -40,6 +40,13 @@ file
If supplied, use this as the destination file.
Otherwise the object_id is used.
MESSAGES
--------
added
The line was added.
removed
The line was removed.
EXAMPLES
--------