From 2cc4d7a752d770c270c411453b54583677895e3e Mon Sep 17 00:00:00 2001 From: Ben Green Date: Mon, 22 Feb 2021 16:32:22 +0000 Subject: [PATCH 1/5] Bumping version to 2.0.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 359a5b9..10bf840 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +2.0.1 \ No newline at end of file From 099ed5fdecd39f57a6f3a51aef1762e1c3f0616f Mon Sep 17 00:00:00 2001 From: Ben Green Date: Mon, 22 Feb 2021 16:32:35 +0000 Subject: [PATCH 2/5] Fixing replace-ini --- overlay/usr/lib/bcg/inc/php-replace-ini.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/overlay/usr/lib/bcg/inc/php-replace-ini.sh b/overlay/usr/lib/bcg/inc/php-replace-ini.sh index 9921c59..32c54f3 100644 --- a/overlay/usr/lib/bcg/inc/php-replace-ini.sh +++ b/overlay/usr/lib/bcg/inc/php-replace-ini.sh @@ -14,12 +14,12 @@ set -euo pipefail replace-ini () { # get array and file - local -n ARR=${1} + local -n VALUES=${1} FILE=${2} # loop - for KEY in ${!A[@]} ; do - VAL=${ARR[$KEY]} + for KEY in ${!VALUES[@]} ; do + VAL=${VALUES[$KEY]} if [ ! -z "${VAL}" ] ; then bcg-debug "${KEY}=${VAL}." "replace-ini" sed -i "s|^;\?${KEY}.*$|${KEY} = ${VAL}|i" ${FILE} From 6d0bd5d3fe1f243086ea21361628e8d769a1c1bf Mon Sep 17 00:00:00 2001 From: Ben Green Date: Mon, 22 Feb 2021 16:37:21 +0000 Subject: [PATCH 3/5] Tweaking replace function --- overlay/usr/lib/bcg/inc/php-replace-ini.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/overlay/usr/lib/bcg/inc/php-replace-ini.sh b/overlay/usr/lib/bcg/inc/php-replace-ini.sh index 32c54f3..9038f84 100644 --- a/overlay/usr/lib/bcg/inc/php-replace-ini.sh +++ b/overlay/usr/lib/bcg/inc/php-replace-ini.sh @@ -14,12 +14,14 @@ set -euo pipefail replace-ini () { # get array and file - local -n VALUES=${1} + local -n A=${1} FILE=${2} + bcg-debug "Replacing configuration values in ${FILE}." + # loop - for KEY in ${!VALUES[@]} ; do - VAL=${VALUES[$KEY]} + for KEY in ${!A[@]} ; do + VAL=${A[$KEY]} if [ ! -z "${VAL}" ] ; then bcg-debug "${KEY}=${VAL}." "replace-ini" sed -i "s|^;\?${KEY}.*$|${KEY} = ${VAL}|i" ${FILE} From a1e4f704c8c64135bf6151e71cc5203886a8f45b Mon Sep 17 00:00:00 2001 From: Ben Green Date: Mon, 22 Feb 2021 16:37:48 +0000 Subject: [PATCH 4/5] Running replace-ini as bash --- overlay/usr/lib/bcg/inc/php-replace-ini.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay/usr/lib/bcg/inc/php-replace-ini.sh b/overlay/usr/lib/bcg/inc/php-replace-ini.sh index 9038f84..3667236 100644 --- a/overlay/usr/lib/bcg/inc/php-replace-ini.sh +++ b/overlay/usr/lib/bcg/inc/php-replace-ini.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/with-contenv bash set -euo pipefail From e56dc684d4145a73b9ab5ddafd9df81ab0632d73 Mon Sep 17 00:00:00 2001 From: Ben Green Date: Mon, 22 Feb 2021 16:42:16 +0000 Subject: [PATCH 5/5] Removing flags from replace-ini source --- overlay/usr/lib/bcg/inc/php-replace-ini.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/overlay/usr/lib/bcg/inc/php-replace-ini.sh b/overlay/usr/lib/bcg/inc/php-replace-ini.sh index 3667236..0845e28 100644 --- a/overlay/usr/lib/bcg/inc/php-replace-ini.sh +++ b/overlay/usr/lib/bcg/inc/php-replace-ini.sh @@ -1,6 +1,4 @@ -#!/usr/bin/with-contenv bash - -set -euo pipefail +#!/bin/bash #======================================================================================================================