Add update_config.sh script

This commit is contained in:
Evilham 2024-02-27 15:53:36 +01:00
parent 58fc01f17d
commit 9bad848c0f
Signed by: evilham
GPG key ID: AE3EE30D970886BF
2 changed files with 14 additions and 1 deletions

View file

@ -11,7 +11,7 @@ verbs = ["reporta", "diu", "anuncia", "comenta", "informa"]
min_length = 30
# Set to '' to disable text response
ack_text = "✅ Gràcies {{user}}, hem desat la teva resposta per eXOfàsia!"
update_config_command = "sh /data/update_config.sh"
update_config_command = "sh ./update_config.sh"
editors = [
'@evilham:unchat.cat',
'@guifipedro:matrix.guifi.net',

13
hebbot/update_config.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh -eu
cd "${HEBBOT_DATA_DIR:-/data}"
BASE_HEBBOT_URL="${BASE_HEBBOT_URL:-https://farga.exo.cat/exo/eXOfasia/raw/branch/main/hebbot}"
for hbfile in \
config.toml report_template.md section_template.md \
project_template.md update_config.sh; do
echo "Updating ${hbfile} ..."
wget -nv -O "${hbfile}.new" "${BASE_HEBBOT_URL}/${hbfile}"
mv -v "${hbfile}.new" "${hbfile}"
done