1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-27 00:28:10 +00:00
trezor-firmware/python/helper-scripts/build-coins-json.sh
2019-09-12 17:35:55 +02:00

26 lines
442 B
Bash
Executable File

#!/usr/bin/env bash
cd $(dirname $0)/..
DEST=src/trezorlib/coins.json
BUILD_COINS_AT="../common/tools/cointool.py dump \
--list --support \
--include-type=bitcoin \
--exclude=icon \
-o \
"
if [ "$1" == "--check" ]; then
TMP=$(mktemp)
$BUILD_COINS_AT $TMP
diff -q $DEST $TMP
ERR=$?
if [ "$ERR" -ne 0 ]; then
echo "Please run $0"
fi
rm $TMP
exit $ERR
else
$BUILD_COINS_AT $DEST
fi