Move substitutions outside of printf expression

On the advice of shellcheck
This commit is contained in:
2025-11-23 12:23:48 -08:00
parent c4b9ad3c12
commit e45b575af2

View File

@@ -5,7 +5,7 @@ FILE="{filename}"
EXPECTED_HASH="{filehash}"
if [ "$(sha256sum "$FILE" | awk '{print $1}')" = "$EXPECTED_HASH" ]; then
printf "File $FILE validated with message:\n$MESSAGE"
printf "File %%s validated with message:\\n%%s" "$FILE" "$MESSAGE"
exit 0
else
echo "File $FILE is not valid"