2024-05-01 08:36:34 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
. ./.env
|
|
|
|
|
|
|
|
DOCKER_API='https://hub.docker.com/v2/namespaces/searxng/repositories/searxng'
|
|
|
|
REPO='https://github.com/searxng/searxng/raw'
|
|
|
|
|
2024-07-30 10:21:28 +00:00
|
|
|
tmp="$(mktemp)"
|
|
|
|
|
|
|
|
new_tag="$(curl -L "$DOCKER_API/tags" | jq -r '.results[2].name')"
|
2024-05-01 08:36:34 +00:00
|
|
|
new_commit="$(grep -Eo '\w+$' <<< "$new_tag")"
|
|
|
|
|
2024-07-30 10:21:28 +00:00
|
|
|
for f in limiter.toml settings.yml; do
|
|
|
|
if curl -Lo "$tmp" "$REPO/$new_commit/searx/$f" && ! diff -Z "$tmp" "config/$f" > /dev/null; then
|
2024-12-23 03:06:06 +00:00
|
|
|
$EDITOR -d -c "wincmd l" -- "$tmp" "config/$f"
|
2024-07-30 10:21:28 +00:00
|
|
|
fi
|
2024-05-15 21:31:25 +00:00
|
|
|
done
|
2024-05-01 08:36:34 +00:00
|
|
|
|
|
|
|
sed -i "/^IMAGEAPP=/s/:.*/:$new_tag/" .env
|