Changed jq command arg for jq 1.4 compatibility

the notion "-rc" has been rewritten to "-r -c"
This commit is contained in:
Alex 2019-01-23 11:14:43 +01:00 committed by GitHub
parent f05854f123
commit 68cc917915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -512,7 +512,7 @@ if [ -n "${SEQUENCECMD}" ]
rm -f "${TMP}/.alexa.automation" rm -f "${TMP}/.alexa.automation"
exit 1 exit 1
fi fi
SEQUENCE=$(jq --arg utterance "${UTTERANCE}" -rc '.[] | select( .triggers[].payload.utterance == $utterance) | .sequence' "${TMP}/.alexa.automation" | sed 's/"/\\"/g' | sed "s/ALEXA_CURRENT_DEVICE_TYPE/${DEVICETYPE}/g" | sed "s/ALEXA_CURRENT_DSN/${DEVICESERIALNUMBER}/g" | sed "s/ALEXA_CUSTOMER_ID/${MEDIAOWNERCUSTOMERID}/g" | sed 's/ /_/g') SEQUENCE=$(jq --arg utterance "${UTTERANCE}" -r -c '.[] | select( .triggers[].payload.utterance == $utterance) | .sequence' "${TMP}/.alexa.automation" | sed 's/"/\\"/g' | sed "s/ALEXA_CURRENT_DEVICE_TYPE/${DEVICETYPE}/g" | sed "s/ALEXA_CURRENT_DSN/${DEVICESERIALNUMBER}/g" | sed "s/ALEXA_CUSTOMER_ID/${MEDIAOWNERCUSTOMERID}/g" | sed 's/ /_/g')
rm -f "${TMP}/.alexa.automation" rm -f "${TMP}/.alexa.automation"
echo "Running routine: ${UTTERANCE}" echo "Running routine: ${UTTERANCE}"