searxng/diff.sh
2024-05-01 10:52:19 +02:00

14 lines
391 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")"
$EDITOR -d -c "wincmd l" -- "$REPO/$new_commit/searx/settings.yml" settings.yml
sed -i "/^IMAGEAPP=/s/:.*/:$new_tag/" .env