From a03f12990b80f5970442d7c5d250eb80175ab7b8 Mon Sep 17 00:00:00 2001 From: xZero707 Date: Mon, 25 Jul 2022 23:51:18 +0200 Subject: [PATCH] Update regex so only last zero matches Fixes the bug with newer sed versions --- build/patch-util/rootfs/wp/entrypoint.sh | 2 +- rootfs/etc/cont-init.d/10-init-wordpress | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/patch-util/rootfs/wp/entrypoint.sh b/build/patch-util/rootfs/wp/entrypoint.sh index 860ac77..b8bea8a 100755 --- a/build/patch-util/rootfs/wp/entrypoint.sh +++ b/build/patch-util/rootfs/wp/entrypoint.sh @@ -3,7 +3,7 @@ echo "> Downloading WordPress ${WP_VERSION} ..." # Removes trailing zero if found -WP_SHORT_VERSION=$(echo "${WP_VERSION}" | sed --expression='s/.0//g'); +WP_SHORT_VERSION=$(echo "${WP_VERSION}" | sed --expression='s/.0$//g'); echo "> Short Version: ${WP_SHORT_VERSION}" wp --allow-root --path="/tmp" core download --locale="${WP_LOCALE}" --version="${WP_SHORT_VERSION}" diff --git a/rootfs/etc/cont-init.d/10-init-wordpress b/rootfs/etc/cont-init.d/10-init-wordpress index a107b85..43540b2 100644 --- a/rootfs/etc/cont-init.d/10-init-wordpress +++ b/rootfs/etc/cont-init.d/10-init-wordpress @@ -7,7 +7,7 @@ DISABLE_WP_UPDATES="${ENFORCE_DISABLE_WP_UPDATES:-true}" # Removes trailing zero if found # This is required due to inconsistencies between WodPress docker image versioning and wp-cli core download # If patch version is 0, it is not considered by wp-cli. -WP_VERSION=$(echo "${WP_VERSION}" | sed --expression='s/.0//g'); +WP_VERSION=$(echo "${WP_VERSION}" | sed --expression='s/.0$//g'); function disableUpdatesPatch() { if [ "${DISABLE_WP_UPDATES}" != "false" ]; then