From 63c2e22fa1684c60818562160e292b4ff4e8d161 Mon Sep 17 00:00:00 2001 From: John Locke Date: Mon, 15 Aug 2016 11:25:03 -0700 Subject: [PATCH] Fix broken bash multiple test --- bin/out | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/out b/bin/out index 81ca46f..e23a8eb 100755 --- a/bin/out +++ b/bin/out @@ -30,11 +30,11 @@ matrix_endpoint="$matrix_server_url/_matrix/client/r0/rooms/$room_id/send/m.room text_file="$(jq -r '.params.text_file // ""' < "${payload}")" thisdata_file="$(jq -r '.params.data_file // ""' < "${payload}")" -[ -n "$thisdata_file" && "$thisthisdata_file" != "$data_file" ] && data_file="${thisdata_file}" +[[ -n $thisdata_file && $thisthisdata_file != $data_file ]] && data_file="${thisdata_file}" from="$(jq -r '.params.from // ""' < "${payload}")" text="$(jq '(.params.text // "${TEXT_FILE_CONTENT}")' < "${payload}")" thismsgtype="$(jq -r '.params.msgtype // ""' < "${payload}")" -[ -n "$thismsgtype" && "$thismsgtype" != "$msgtype" ] && msgtype="${thismsgtype}" +[[ -n $thismsgtype && $thismsgtype != $msgtype ]] && msgtype="${thismsgtype}" always_notify="$(jq -r '.params.always_notify // "false"' < "${payload}")" debug="$(jq -r '.params.debug // "false"' < "${payload}")"