new updater
This commit is contained in:
parent
20ae1db9fd
commit
9ba8bba8f5
20
update.sh
Executable file
20
update.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: $0 <PARAMETER> <NEW_VALUE>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PARAMETER=$1
|
||||
NEW_VALUE=$2
|
||||
|
||||
# Список файлов
|
||||
FILES=(
|
||||
"./config.json"
|
||||
".env"
|
||||
)
|
||||
|
||||
for FILE in "${FILES[@]}"; do
|
||||
EXPANDED_FILE=$(eval echo "$FILE")
|
||||
sed -i "s|###$PARAMETER###|$NEW_VALUE|g" "$EXPANDED_FILE"
|
||||
done
|
Loading…
Reference in New Issue
Block a user