Update gen_signature.sh

This commit is contained in:
David Holdeman 2024-02-27 08:39:47 -06:00 committed by rusefillc
parent 899f7f6439
commit 02f11e9c9d
1 changed files with 4 additions and 4 deletions

View File

@ -31,10 +31,10 @@ else
fi
echo "#define TS_SIGNATURE \"rusEFI $branchname.$date.${SHORT_BOARD_NAME}.@@SIGNATURE_HASH@@\"" >> ${TEMP_FILE}
#
# TODO: what's going on here? signature*txt is excluded from git by tunerstudio/.gitignore let's have a code comment explaining the logic below!
#
cmp ${TEMP_FILE} ${SIGNATURE_FILE_NAME} || mv -f ${TEMP_FILE} ${SIGNATURE_FILE_NAME}
# cmp compares files to see if they are different. If they are different or if SIGNATURE_FILE_NAME doesn't exist, the mv command will run.
# We redirect errors to /dev/null to supress the error if SIGNATURE_FILE_NAME doesn't exsit
cmp ${TEMP_FILE} ${SIGNATURE_FILE_NAME} 2>/dev/null || mv -f ${TEMP_FILE} ${SIGNATURE_FILE_NAME}
rm -f ${TEMP_FILE}
exit 0