Make target file relative to script file
Since we expect them to be in the same directory
This commit is contained in:
@@ -17,9 +17,10 @@
|
|||||||
|
|
||||||
MESSAGE="{message}"
|
MESSAGE="{message}"
|
||||||
FILE="{filename}"
|
FILE="{filename}"
|
||||||
|
FILE_PATH="$(dirname "$0")/$FILE"
|
||||||
EXPECTED_HASH="{filehash}"
|
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"
|
printf "File %s validated with message:\\n%s" "$FILE" "$MESSAGE"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user