Update regex so only last zero matches

Fixes the bug with newer sed versions
This commit is contained in:
2022-07-25 23:51:18 +02:00
parent 6cbd0dd438
commit a03f12990b
2 changed files with 2 additions and 2 deletions

View File

@@ -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}"