mempool: init at 2.5.0
This commit is contained in:
parent
8cdedac046
commit
f0bf94cc5a
9 changed files with 435 additions and 0 deletions
31
pkgs/mempool/frontend-assets-fetch.sh
Executable file
31
pkgs/mempool/frontend-assets-fetch.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Fetch hash-locked versions of assets that are dynamically fetched via
|
||||
# https://github.com/mempool/mempool/blob/master/frontend/sync-assets.js
|
||||
# when running `npm run build` in the frontend.
|
||||
#
|
||||
# This file is updated by ./frontend-assets-update.sh
|
||||
|
||||
declare -A revs=(
|
||||
["mempool/mining-pools"]=e889230b0924d7d72eb28186db6f96ef94361fa5
|
||||
["mempool/mining-pool-logos"]=9cb443035878c3f112af97384d624de245afe72d
|
||||
)
|
||||
|
||||
fetchFile() {
|
||||
repo=$1
|
||||
file=$2
|
||||
rev=${revs["$repo"]}
|
||||
curl -fsS "https://raw.githubusercontent.com/$repo/$rev/$file"
|
||||
}
|
||||
|
||||
fetchRepo() {
|
||||
repo=$1
|
||||
rev=${revs["$repo"]}
|
||||
curl -fsSL "https://github.com/$repo/archive/$rev.tar.gz"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2094
|
||||
fetchFile "mempool/mining-pools" pools.json > pools.json
|
||||
mkdir mining-pools
|
||||
fetchRepo "mempool/mining-pool-logos" | tar xz --strip-components=1 -C mining-pools
|
||||
Loading…
Add table
Add a link
Reference in a new issue