From 6e5fab01d476ef7e3bfe9797eaf540328e6cf20e Mon Sep 17 00:00:00 2001 From: Jakub Matys Date: Wed, 1 Aug 2018 10:55:19 +0200 Subject: [PATCH] Added script to generate blockchain config --- build/templates/generate.go | 2 +- contrib/scripts/build-blockchaincfg.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 contrib/scripts/build-blockchaincfg.sh diff --git a/build/templates/generate.go b/build/templates/generate.go index bafb51ee76..20d2f893e4 100644 --- a/build/templates/generate.go +++ b/build/templates/generate.go @@ -138,7 +138,7 @@ func main() { coin := os.Args[1] config := loadConfig(coin) generatePackageDefinitions(config) - fmt.Fprintf(os.Stderr, "Package files for %v generated to %v\n", coin, outputDir) + fmt.Printf("Package files for %v generated to %v\n", coin, outputDir) } func loadConfig(coin string) *Config { diff --git a/contrib/scripts/build-blockchaincfg.sh b/contrib/scripts/build-blockchaincfg.sh new file mode 100755 index 0000000000..01af445797 --- /dev/null +++ b/contrib/scripts/build-blockchaincfg.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +go run build/templates/generate.go $1 > /dev/null +mv build/pkg-defs/blockbook/blockchaincfg.json build +rm -rf build/pkg-defs +echo Generated build/blockchaincfg.json for $1