From 4294686fb21a4712e8d71badfcf5a81cfe82f3b4 Mon Sep 17 00:00:00 2001 From: CLHatch Date: Thu, 6 Jun 2024 23:53:46 -0500 Subject: [PATCH] Allow lower case vars in `env_rename` --- .scripts/env_rename.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.scripts/env_rename.sh b/.scripts/env_rename.sh index d904ad2b96..57a40ae3da 100644 --- a/.scripts/env_rename.sh +++ b/.scripts/env_rename.sh @@ -5,9 +5,9 @@ IFS=$'\n\t' env_rename() { local FROMVAR=${1-} local TOVAR=${2-} - if grep -q -i -P "^\s*${FROMVAR}\s*=" "${COMPOSE_ENV}"; then + if grep -q -P "^\s*${FROMVAR}\s*=" "${COMPOSE_ENV}"; then notice "Renaming ${FROMVAR} to ${TOVAR} in ${COMPOSE_ENV} file." - sed -i "s/^\s*${FROMVAR}\s*=/${TOVAR}=/i" "${COMPOSE_ENV}" || fatal "Failed to rename var from ${FROMVAR} to ${TOVAR}\nFailing command: ${F[C]}sed -i \"s/^\\s*${FROMVAR}\\s*=/${TOVAR}=/\" \"${COMPOSE_ENV}\"" + sed -i "s/^\s*${FROMVAR}\s*=/${TOVAR}=/" "${COMPOSE_ENV}" || fatal "Failed to rename var from ${FROMVAR} to ${TOVAR}\nFailing command: ${F[C]}sed -i \"s/^\\s*${FROMVAR}\\s*=/${TOVAR}=/\" \"${COMPOSE_ENV}\"" fi }