2020-06-28 10:39:09 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-07-05 19:39:55 -07:00
|
|
|
# file gen_signature.sh
|
|
|
|
|
2020-06-28 10:39:09 -07:00
|
|
|
SHORT_BOARDNAME=$1
|
|
|
|
|
2020-07-05 19:39:55 -07:00
|
|
|
|
2020-07-05 22:01:30 -07:00
|
|
|
SIGNATURE_FILE_NAME=tunerstudio/generated/signature_${SHORT_BOARDNAME}.txt
|
2020-06-28 10:39:09 -07:00
|
|
|
echo "Generating signature for ${SHORT_BOARDNAME}"
|
|
|
|
|
|
|
|
# generate a unique signature
|
2021-03-05 17:16:59 -08:00
|
|
|
date=`TZ=Europe/London date +"%Y.%m.%d"`
|
2020-07-05 19:39:55 -07:00
|
|
|
echo "#define SIGNATURE_DATE $date" > ${SIGNATURE_FILE_NAME}
|
|
|
|
echo "#define SIGNATURE_BOARD ${SHORT_BOARDNAME}" >> ${SIGNATURE_FILE_NAME}
|
2020-06-28 10:39:09 -07:00
|
|
|
|
2020-07-05 19:39:55 -07:00
|
|
|
echo "// SIGNATURE_HASH is a built-in variable generated by ConfigDefinition.jar" >> ${SIGNATURE_FILE_NAME}
|
2020-06-28 10:39:09 -07:00
|
|
|
|
2020-07-05 19:39:55 -07:00
|
|
|
echo "#define TS_SIGNATURE \"rusEFI @@SIGNATURE_DATE@@.@@SIGNATURE_BOARD@@.@@SIGNATURE_HASH@@\"" >> ${SIGNATURE_FILE_NAME}
|
2020-07-02 09:33:31 -07:00
|
|
|
|
2020-06-28 10:39:09 -07:00
|
|
|
exit 0
|