From 366f2e5bd12c47de99fb93371c774274847f498a Mon Sep 17 00:00:00 2001 From: Yorick Date: Thu, 3 Oct 2024 07:07:52 +0000 Subject: [PATCH] Better Erigon v3 detection --- ethd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ethd b/ethd index 32718fc9..cd5a496d 100755 --- a/ethd +++ b/ethd @@ -795,9 +795,11 @@ __delete_erigon() { # Check Erigon version, only continue if v3 __var="ERIGON_DOCKER_TAG" __value=$(sed -n -e "s/^${__var}=\(.*\)/\1/p" "${__env_file}" || true) + __var="ERIGON_DOCKER_REPO" + __repo=$(sed -n -e "s/^${__var}=\(.*\)/\1/p" "${__env_file}" || true) # I do mean to match literally # shellcheck disable=SC2076 - if [[ ! ("${__value}" =~ "v3" || "${__value}" = "latest" || "${__value}" = "main-latest") ]]; then + if [[ ! ("${__value}" =~ "v3" || ( "${__value}" = "latest" && "${__repo}" =~ "thorax" ) || "${__value}" = "main-latest") ]]; then return 0 fi