Merge PR #35 from adn77/master

Changed jq command arg for jq 1.4 compatibility
This commit is contained in:
Alex 2019-01-23 11:16:05 +01:00 committed by GitHub
commit 7f8d58dabe
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"
exit 1
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"
echo "Running routine: ${UTTERANCE}"