fix signature (#1555)

Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
This commit is contained in:
andreika-git 2020-07-01 23:32:12 +03:00 committed by GitHub
parent 39b07c647e
commit bd0646ef75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,8 @@ echo "#define SIGNATURE_DATE $date" > tunerstudio/signature_${SHORT_BOARDNAME}.t
echo "#define SIGNATURE_BOARD ${SHORT_BOARDNAME}" >> tunerstudio/signature_${SHORT_BOARDNAME}.txt
nanosec=$(date +"%N")
nanosec=$((10#$nanosec)) # numbers starting from 0 can be treated as octal numbers
# numbers starting from 0 can be treated as octal numbers
[[ "$nanosec" =~ ^0*([0-9]+)$ ]] && nanosec="${BASH_REMATCH[1]}"
hash=$(($nanosec % 2147483648))
echo "#define SIGNATURE_HASH $hash" >> tunerstudio/signature_${SHORT_BOARDNAME}.txt