diff options
Diffstat (limited to 'generate_checksum.sh')
| -rwxr-xr-x | generate_checksum.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/generate_checksum.sh b/generate_checksum.sh index 5847ff5..4b82e53 100755 --- a/generate_checksum.sh +++ b/generate_checksum.sh @@ -1,6 +1,11 @@ #!/bin/bash cd "$(realpath $(dirname $0))" -function sha256sum() { shasum -a 256 "$@" ; } && export -f sha256sum + +if [[ "$(uname)" == "Darwin" ]]; +then + function sha256sum() { shasum -a 256 "$@" ; } && export -f sha256sum +fi + for coin in monero wownero; do submodule_hash=$(git ls-tree HEAD ${coin} | xargs | awk '{ print $3 }') @@ -23,5 +28,12 @@ const String wallet2_api_c_h_sha256 = "${COIN_wallet2_api_c_h_sha256}"; const String wallet2_api_c_cpp_sha256 = "${COIN_wallet2_api_c_cpp_sha256}"; const String wallet2_api_c_exp_sha256 = "${COIN_wallet2_api_c_exp_sha256}"; EOF + cat > impls/monero.ts/checksum_${coin}.ts << EOF +export const ${coin}Checksum = { + wallet2_api_c_h_sha256: "${COIN_wallet2_api_c_h_sha256}", + wallet2_api_c_cpp_sha256: "${COIN_wallet2_api_c_cpp_sha256}", + wallet2_api_c_exp_sha256: "${COIN_wallet2_api_c_exp_sha256}", +} +EOF done |
