mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 14:08:11 +00:00
25 lines
417 B
Bash
25 lines
417 B
Bash
|
#!/bin/bash
|
||
|
cd $(dirname $0)/..
|
||
|
|
||
|
DEST=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
|
||
|
if [ "$?" -ne 0 ]; then
|
||
|
echo "Please run $0"
|
||
|
fi
|
||
|
rm $TMP
|
||
|
exit $ERR
|
||
|
else
|
||
|
$BUILD_COINS_AT $DEST
|
||
|
fi
|