ritual/update.sh
vvzvlad 19825d5561
Create update.sh
Signed-off-by: vvzvlad <github@vvzvlad.xyz>
2024-06-08 20:13:10 +03:00

22 lines
486 B
Bash

#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <wallet_address> <private_key>"
exit 1
fi
WALLET_ADDRESS=$1
PRIVATE_KEY=$2
# Список файлов
FILES=(
"./projects/hello-world/container/config.json"
"./projects/hello-world/contracts/Makefile"
)
for FILE in "${FILES[@]}"; do
EXPANDED_FILE=$(eval echo "$FILE")
sed -i "s/###WALLET_ADDRESS###/$WALLET_ADDRESS/g" "$EXPANDED_FILE"
sed -i "s/###PRIVATE_KEY###/$PRIVATE_KEY/g" "$EXPANDED_FILE"
done