From a787f9d644d8c57de2fb7c48be24831bd4d5c7a5 Mon Sep 17 00:00:00 2001 From: cventastic Date: Tue, 28 Dec 2021 14:45:41 +0100 Subject: [PATCH] no infile substitution --- util/prepare.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/util/prepare.sh b/util/prepare.sh index 46859354..6041c5d1 100755 --- a/util/prepare.sh +++ b/util/prepare.sh @@ -1,6 +1,15 @@ #!/bin/bash source .env -envsubst < chains/chains_mainnet.json > chains/chains_mainnet.json -envsubst < chains/chains_testnet.json > chains/chains_testnet.json + +originalfile="chains/chains_mainnet.json" +tmpfile=$(mktemp) +cp --attributes-only --preserve $originalfile $tmpfile +cat $originalfile | envsubst > $tmpfile && mv $tmpfile $originalfile + +originalfile="chains/chains_testnet.json" +tmpfile=$(mktemp) +cp --attributes-only --preserve $originalfile $tmpfile +cat $originalfile | envsubst > $tmpfile && mv $tmpfile $originalfile + chown -R 1005:1001 chains bootstrap_skript \ No newline at end of file