refactoring & docs

This commit is contained in:
rusefi 2020-07-05 22:39:55 -04:00
parent 1305be733e
commit 1534ad4f81
2 changed files with 10 additions and 6 deletions

View File

@ -2,8 +2,8 @@
#set -x
echo "This batch files reads rusefi_config.txt and produses firmware persistent configuration headers"
echo "the storage section of rusefi.ini is updated as well"
echo "This script reads rusefi_config.txt and produces firmware persistent configuration headers"
echo "the storage section of rusefiXXX.ini is updated as well"
if [ -z "$1" ]; then
echo "Board name parameter expected"

View File

@ -1,16 +1,20 @@
#!/bin/bash
# file gen_signature.sh
SHORT_BOARDNAME=$1
SIGNATURE_FILE_NAME=tunerstudio/signature_${SHORT_BOARDNAME}.txt
echo "Generating signature for ${SHORT_BOARDNAME}"
# generate a unique signature
date=$(date +"%Y.%m.%d")
echo "#define SIGNATURE_DATE $date" > tunerstudio/signature_${SHORT_BOARDNAME}.txt
echo "#define SIGNATURE_BOARD ${SHORT_BOARDNAME}" >> tunerstudio/signature_${SHORT_BOARDNAME}.txt
echo "#define SIGNATURE_DATE $date" > ${SIGNATURE_FILE_NAME}
echo "#define SIGNATURE_BOARD ${SHORT_BOARDNAME}" >> ${SIGNATURE_FILE_NAME}
echo "// SIGNATURE_HASH is a built-in variable generated by ConfigDefinition.jar" >> tunerstudio/signature_${SHORT_BOARDNAME}.txt
echo "// SIGNATURE_HASH is a built-in variable generated by ConfigDefinition.jar" >> ${SIGNATURE_FILE_NAME}
echo "#define TS_SIGNATURE \"rusEFI @@SIGNATURE_DATE@@.@@SIGNATURE_BOARD@@.@@SIGNATURE_HASH@@\"" >> tunerstudio/signature_${SHORT_BOARDNAME}.txt
echo "#define TS_SIGNATURE \"rusEFI @@SIGNATURE_DATE@@.@@SIGNATURE_BOARD@@.@@SIGNATURE_HASH@@\"" >> ${SIGNATURE_FILE_NAME}
exit 0