termux-notification: handle multiline content

fixes termux/termux-api#274
This commit is contained in:
Alessandro Caputo 2019-08-07 20:52:36 +02:00 committed by Fredrik Fornwall
parent f483c815f6
commit d9e1d699f5

View File

@ -141,5 +141,4 @@ if [ -n "$OPT_TITLE" ]; then set -- "$@" --es title "$OPT_TITLE"; fi
if [ -n "$OPT_TYPE" ]; then set -- "$@" --es type "$OPT_TYPE"; fi if [ -n "$OPT_TYPE" ]; then set -- "$@" --es type "$OPT_TYPE"; fi
if [ -n "$OPT_VIBRATE" ]; then set -- "$@" --ela vibrate "$OPT_VIBRATE"; fi if [ -n "$OPT_VIBRATE" ]; then set -- "$@" --ela vibrate "$OPT_VIBRATE"; fi
# Note that we want to accept an empty content (--content ""). echo "$OPT_CONTENT" | /data/data/com.termux/files/usr/libexec/termux-api Notification "$@"
echo ${OPT_CONTENT:=""} | /data/data/com.termux/files/usr/libexec/termux-api Notification "$@"