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"`
|
2021-11-06 20:19:53 -07:00
|
|
|
echo "! Generated by gen_signature.sh" > ${SIGNATURE_FILE_NAME}
|
2020-06-28 10:39:09 -07:00
|
|
|
|
2021-11-06 20:19:53 -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
|
|
|
|
2023-01-19 22:14:05 -08:00
|
|
|
# read the current git branch name
|
|
|
|
branchname=`git branch --show-current`
|
|
|
|
echo "! Current branch is: $branchname" >> ${SIGNATURE_FILE_NAME}
|
|
|
|
|
|
|
|
echo "#define TS_SIGNATURE \"rusEFI $branchname.$date.${SHORT_BOARDNAME}.@@SIGNATURE_HASH@@\"" >> ${SIGNATURE_FILE_NAME}
|
2020-07-02 09:33:31 -07:00
|
|
|
|
2020-06-28 10:39:09 -07:00
|
|
|
exit 0
|