From 5597af27bf01a7ad1075777a7c5f42c4563509c4 Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Mon, 26 Aug 2024 00:21:09 +0300 Subject: [PATCH] Add update.sh --- update.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 update.sh diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..abbfee3 --- /dev/null +++ b/update.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ "$#" -ne 3 ]; then + echo "Usage: $0 " + exit 1 +fi + +MNEMONIC=$1 +WALLET=$2 +RPC_URL=$3 + +# List of files +FILES=( + "./config.json" +) + +for FILE in "${FILES[@]}"; do + EXPANDED_FILE=$(eval echo "$FILE") + sed -i "s|###MNEMONIC###|$MNEMONIC|g" "$EXPANDED_FILE" + sed -i "s|###WALLET###|$WALLET|g" "$EXPANDED_FILE" + sed -i "s|###RPC_URL###|$RPC_URL|g" "$EXPANDED_FILE" +done