From ae36bab6ec2fc979d790c628fb5acfadb20b09bf Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Fri, 27 Dec 2024 13:48:07 +0100 Subject: [PATCH] - Fix docker_mk_env config sed generation. --- ReleaseNotes.txt | 8 ++++++++ sbin/docker_mk_env | 11 +++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 8c651cc..a85a6e4 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,11 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3-Docker/Docker Tools V 1.3.2 - A. GIBERT - 2024/12/27 +------------------------------------------------------------------------------------------------------------------------------------ + +- Add docker_config_add function for docker_mk_env to support config file generation. + + + ------------------------------------------------------------------------------------------------------------------------------------ Rx3-Docker/Docker Tools V 1.3.1 - A. GIBERT - 2024/12/14 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/sbin/docker_mk_env b/sbin/docker_mk_env index 66a8269..45ab982 100755 --- a/sbin/docker_mk_env +++ b/sbin/docker_mk_env @@ -377,10 +377,12 @@ fi >${APPL_HOME_DIR}/.env +>${APPL_HOME_DIR}/.env.sed for var in $( ( grep "^ *[a-zA-Z0-9_-]*=" ${APPL_HOME_DIR}/env | sed -e "s/=.*//" -e "s/ *//"; echo ${DYNVAR_LIST} | sed -e 's/ /\n/g') | sort -u) do - echo "${var}='${!var}'" >>${APPL_HOME_DIR}/.env + echo "${var}='${!var}'" >>${APPL_HOME_DIR}/.env + echo "s/\${${var}}/${!var//\//\\/}/g" >>${APPL_HOME_DIR}/.env.sed done @@ -394,9 +396,6 @@ do config_file_source="$2" IFS=" " - - while read line - do - eval echo $(echo ${line} | sed -e 's/"/\\"/g' -e 's//\\>/g';) - done <${config_file_source} >${config_file_target} + + sed <${config_file_source} >${config_file_target} -f ${APPL_HOME_DIR}/.env.sed done