From 809a7c30e9177496b49f285564e441e65fc3188f Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Mon, 23 Aug 2021 19:18:46 +0000 Subject: [PATCH] 8.9.18-debian-10-r5 release --- bitnami/drupal/8/debian-10/Dockerfile | 2 +- .../prebuildfs/opt/bitnami/scripts/libfile.sh | 24 +++++++++++++++++-- bitnami/drupal/README.md | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/bitnami/drupal/8/debian-10/Dockerfile b/bitnami/drupal/8/debian-10/Dockerfile index 90a8bfc4f248..813a37515181 100644 --- a/bitnami/drupal/8/debian-10/Dockerfile +++ b/bitnami/drupal/8/debian-10/Dockerfile @@ -29,7 +29,7 @@ ENV ALLOW_EMPTY_PASSWORD="no" \ APACHE_HTTPS_PORT_NUMBER="" \ APACHE_HTTP_PORT_NUMBER="" \ BITNAMI_APP_NAME="drupal" \ - BITNAMI_IMAGE_VERSION="8.9.18-debian-10-r4" \ + BITNAMI_IMAGE_VERSION="8.9.18-debian-10-r5" \ MARIADB_HOST="mariadb" \ MARIADB_PORT_NUMBER="3306" \ MARIADB_ROOT_PASSWORD="" \ diff --git a/bitnami/drupal/8/debian-10/prebuildfs/opt/bitnami/scripts/libfile.sh b/bitnami/drupal/8/debian-10/prebuildfs/opt/bitnami/scripts/libfile.sh index dd47f25e4e45..41ebaf7464f6 100644 --- a/bitnami/drupal/8/debian-10/prebuildfs/opt/bitnami/scripts/libfile.sh +++ b/bitnami/drupal/8/debian-10/prebuildfs/opt/bitnami/scripts/libfile.sh @@ -10,7 +10,7 @@ # Functions ######################## -# Replace a regex in a file +# Replace a regex-matching string in a file # Arguments: # $1 - filename # $2 - match regex @@ -30,7 +30,7 @@ replace_in_file() { # We should avoid using 'sed in-place' substitutions # 1) They are not compatible with files mounted from ConfigMap(s) # 2) We found incompatibility issues with Debian10 and "in-place" substitutions - del=$'\001' # Use a non-printable character as a 'sed' delimiter to avoid issues + local -r del=$'\001' # Use a non-printable character as a 'sed' delimiter to avoid issues if [[ $posix_regex = true ]]; then result="$(sed -E "s${del}${match_regex}${del}${substitute_regex}${del}g" "$filename")" else @@ -39,6 +39,26 @@ replace_in_file() { echo "$result" > "$filename" } +######################## +# Replace a regex-matching multiline string in a file +# Arguments: +# $1 - filename +# $2 - match regex +# $3 - substitute regex +# Returns: +# None +######################### +replace_in_file_multiline() { + local filename="${1:?filename is required}" + local match_regex="${2:?match regex is required}" + local substitute_regex="${3:?substitute regex is required}" + + local result + local -r del=$'\001' # Use a non-printable character as a 'sed' delimiter to avoid issues + result="$(perl -pe "BEGIN{undef $/;} s${del}${match_regex}${del}${substitute_regex}${del}sg" "$filename")" + echo "$result" > "$filename" +} + ######################## # Remove a line in a file based on a regex # Arguments: diff --git a/bitnami/drupal/README.md b/bitnami/drupal/README.md index e51ed8c3cda6..7d9614f1f247 100644 --- a/bitnami/drupal/README.md +++ b/bitnami/drupal/README.md @@ -42,7 +42,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t * [`9`, `9-debian-10`, `9.2.4`, `9.2.4-debian-10-r6`, `latest` (9/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-drupal/blob/9.2.4-debian-10-r6/9/debian-10/Dockerfile) -* [`8`, `8-debian-10`, `8.9.18`, `8.9.18-debian-10-r4` (8/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-drupal/blob/8.9.18-debian-10-r4/8/debian-10/Dockerfile) +* [`8`, `8-debian-10`, `8.9.18`, `8.9.18-debian-10-r5` (8/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-drupal/blob/8.9.18-debian-10-r5/8/debian-10/Dockerfile) Subscribe to project updates by watching the [bitnami/drupal GitHub repo](https://github.com/bitnami/bitnami-docker-drupal).