nexus/update.sh

21 lines
364 B
Bash
Raw Permalink Normal View History

2024-12-12 01:53:03 +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-12-12 02:32:36 +03:00
"prover-id"
2024-12-12 01:53:03 +03:00
"docker-compose.yml"
"grist.json"
)
for FILE in "${FILES[@]}"; do
EXPANDED_FILE=$(eval echo "$FILE")
sed -i "s|###$PARAMETER###|$NEW_VALUE|g" "$EXPANDED_FILE"
done