chore: double-quoting verify fields variables

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato 2020-01-20 20:33:18 +00:00 committed by poiana
parent a160fba6c9
commit 739d79a1eb

View File

@ -5,16 +5,16 @@ set -euo pipefail
SOURCE_DIR=$1
OPENSSL=$2
if ! command -v ${OPENSSL} version > /dev/null 2>&1; then
if ! command -v "${OPENSSL}" version > /dev/null 2>&1; then
echo "No openssl command at ${OPENSSL}"
exit 1
fi
NEW_CHECKSUM=$(./falco --list -N | ${OPENSSL} dgst -sha256 | awk '{print $2}')
CUR_CHECKSUM=$(grep FALCO_FIELDS_CHECKSUM ${SOURCE_DIR}/userspace/engine/falco_engine_version.h | awk '{print $3}' | sed -e 's/"//g')
CUR_CHECKSUM=$(grep FALCO_FIELDS_CHECKSUM "${SOURCE_DIR}/userspace/engine/falco_engine_version.h" | awk '{print $3}' | sed -e 's/"//g')
if [ $NEW_CHECKSUM != $CUR_CHECKSUM ]; then
if [ "$NEW_CHECKSUM" != "$CUR_CHECKSUM" ]; then
echo "Set of fields supported has changed (new checksum $NEW_CHECKSUM != old checksum $CUR_CHECKSUM)."
echo "Update checksum and/or version in falco_engine_version.h."
exit 1