nillion/update.sh

21 lines
371 B
Bash
Raw Permalink Normal View History

2024-11-20 04:41:55 +03:00
#!/usr/bin/env bash
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <PARAMETER> <NEW_VALUE>"
exit 1
fi
PARAMETER=$1
NEW_VALUE=$2
# Список файлов
FILES=(
2024-11-20 04:44:57 +03:00
"credentials.json"
"docker-compose.yml"
2024-11-24 04:31:42 +03:00
"grist.json"
2024-11-20 04:41:55 +03:00
)
for FILE in "${FILES[@]}"; do
EXPANDED_FILE=$(eval echo "$FILE")
sed -i "s|###$PARAMETER###|$NEW_VALUE|g" "$EXPANDED_FILE"
done