searxng/diff.sh
2024-05-15 23:37:43 +02:00

16 lines
410 B
Bash
Executable File

#!/bin/bash -e
. ./.env
DOCKER_API='https://hub.docker.com/v2/namespaces/searxng/repositories/searxng'
REPO='https://github.com/searxng/searxng/raw'
new_tag="$(curl -L "$DOCKER_API/tags" | jq -r '.results[3].name')"
new_commit="$(grep -Eo '\w+$' <<< "$new_tag")"
for f in config/*; do
$EDITOR -d -c "wincmd l" -- "$REPO/$new_commit/searx/${f##*/}" "$f"
done
sed -i "/^IMAGEAPP=/s/:.*/:$new_tag/" .env