Update update_ahbot_config.sh

This commit is contained in:
bash
2024-08-12 21:05:28 +02:00
committed by GitHub
parent 0bd2257502
commit f4b15e45ce

View File

@@ -1,5 +1,6 @@
#!/bin/bash
# param 1
AH_BOT_MIN_ITEMS=$1;
if [ -z "$AH_BOT_MIN_ITEMS" ]
then
@@ -7,6 +8,8 @@ then
echo "Second parameter 'AH_BOT_MAX_ITEMS' is required";
exit 1;
fi
# param 2
AH_BOT_MAX_ITEMS=$2;
if [ -z "$AH_BOT_MAX_ITEMS" ]
then
@@ -14,7 +17,6 @@ then
exit 1;
fi
sed -e "s/{{AH_BOT_MIN_ITEMS}}/$AH_BOT_MIN_ITEMS/g" \
-e "s/{{AH_BOT_MAX_ITEMS}}/$AH_BOT_MAX_ITEMS/g" \
"${ROOT_DIR}/../sql/update_ahbot_config.sql" > "/tmp/update_ahbot_config.sql"