From 75d23f6699db57618ceba49235fbb67f8043949a Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Tue, 27 Feb 2024 08:54:54 -0600 Subject: [PATCH] Update gen_signature.sh --- firmware/gen_signature.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/firmware/gen_signature.sh b/firmware/gen_signature.sh index 5f2d488b78..3a466080bf 100755 --- a/firmware/gen_signature.sh +++ b/firmware/gen_signature.sh @@ -32,8 +32,10 @@ fi echo "#define TS_SIGNATURE \"rusEFI $branchname.$date.${SHORT_BOARD_NAME}.@@SIGNATURE_HASH@@\"" >> ${TEMP_FILE} +# We will generate the signature in a temp file, then only use it if it has changed. +# This is to avoid updating the timestamp of the signature file, which would cause the configs to regenerate when they don't need to. # 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 +# We redirect errors to /dev/null to supress the error if SIGNATURE_FILE_NAME doesn't exist cmp ${TEMP_FILE} ${SIGNATURE_FILE_NAME} 2>/dev/null || mv -f ${TEMP_FILE} ${SIGNATURE_FILE_NAME} rm -f ${TEMP_FILE}