mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-13 14:34:33 +00:00
chore: double-quoting verify fields variables
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
parent
a160fba6c9
commit
739d79a1eb
@ -5,16 +5,16 @@ set -euo pipefail
|
|||||||
SOURCE_DIR=$1
|
SOURCE_DIR=$1
|
||||||
OPENSSL=$2
|
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}"
|
echo "No openssl command at ${OPENSSL}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
NEW_CHECKSUM=$(./falco --list -N | ${OPENSSL} dgst -sha256 | awk '{print $2}')
|
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 "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."
|
echo "Update checksum and/or version in falco_engine_version.h."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user