Make target file relative to script file

Since we expect them to be in the same directory
This commit is contained in:
2025-11-24 12:07:34 -08:00
parent 0e6f27a4f2
commit e6c331575a

View File

@@ -17,9 +17,10 @@
MESSAGE="{message}"
FILE="{filename}"
FILE_PATH="$(dirname "$0")/$FILE"
EXPECTED_HASH="{filehash}"
if [ "$(sha256sum "$FILE" | awk '{print $1}')" = "$EXPECTED_HASH" ]; then
if [ "$(sha256sum "$FILE_PATH" | awk '{print $1}')" = "$EXPECTED_HASH" ]; then
printf "File %s validated with message:\\n%s" "$FILE" "$MESSAGE"
exit 0
else