mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-05 14:08:39 +00:00
b3f4b6ac2b
- code is broken because depending modules are added in the next commit
28 lines
672 B
Bash
Executable File
28 lines
672 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
CWD=`dirname "$0"`
|
|
RENDER="$CWD/../vendor/trezor-common/tools/cointool.py render"
|
|
|
|
# Search both in `core/src` and `core/embed` - Solana templates are excluded since those are handled separately
|
|
FIND_TEMPLATES="find $CWD/.. -name *.mako -not -name _proto* -not -path *solana*"
|
|
|
|
check_results() {
|
|
CHECK_FAIL=0
|
|
for filename in $($FIND_TEMPLATES); do
|
|
TMP=`mktemp`
|
|
TARGET="${filename%%.mako}"
|
|
$RENDER "$filename" -o $TMP
|
|
if ! diff -u "$TARGET" "$TMP"; then
|
|
CHECK_FAIL=1
|
|
fi
|
|
done
|
|
exit $CHECK_FAIL
|
|
}
|
|
|
|
if [ "$1" = "--check" ]; then
|
|
check_results
|
|
else
|
|
$FIND_TEMPLATES | xargs $RENDER
|
|
fi
|