Skip to content
Snippets Groups Projects
Commit dc7f2bef authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

handle addition variables config file for non sharable values

parent b9ac7e98
No related branches found
No related tags found
1 merge request!28Handle non sharable values
...@@ -31,11 +31,12 @@ ...@@ -31,11 +31,12 @@
# 2024-11-20 v1.24 <axel.hahn@unibe.ch> fix menu with started database less app; apply template permissions on target file; add $WEBURL; remove $frontendurl # 2024-11-20 v1.24 <axel.hahn@unibe.ch> fix menu with started database less app; apply template permissions on target file; add $WEBURL; remove $frontendurl
# 2024-11-20 v1.25 <axel.hahn@unibe.ch> fix menu startup containers # 2024-11-20 v1.25 <axel.hahn@unibe.ch> fix menu startup containers
# 2024-11-21 v1.26 <axel.hahn@unibe.ch> Reset colors in _checkConfig # 2024-11-21 v1.26 <axel.hahn@unibe.ch> Reset colors in _checkConfig
# 2025-05-13 v1.27 <axel.hahn@unibe.ch> handle addition variables config file for non sharable values
# ====================================================================== # ======================================================================
cd "$( dirname "$0" )" || exit 1 cd "$( dirname "$0" )" || exit 1
_version="1.26" _version="1.27"
# init used vars # init used vars
gittarget= gittarget=
...@@ -45,7 +46,7 @@ _self=$( basename "$0" ) ...@@ -45,7 +46,7 @@ _self=$( basename "$0" )
# shellcheck source=/dev/null # shellcheck source=/dev/null
. "${_self}.cfg" || exit 1 . "${_self}.cfg" || exit 1
. "${_self}_not_shared.cfg" 2>/dev/null
# git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git # git@git-repo.iml.unibe.ch:iml-open-source/docker-php-starterkit.git
selfgitrepo="docker-php-starterkit.git" selfgitrepo="docker-php-starterkit.git"
...@@ -406,7 +407,9 @@ function _fix_no-db(){ ...@@ -406,7 +407,9 @@ function _fix_no-db(){
# used in _generateFiles # used in _generateFiles
function _getreplaces(){ function _getreplaces(){
# loop over vars to make the replacement # loop over vars to make the replacement
grep "^[a-zA-Z]" "$_self.cfg" | while read -r line for myfile in "${_self}.cfg" "${_self}_not_shared.cfg"
do
grep "^[a-zA-Z]" "${myfile}" | while read -r line
do do
# echo replacement: $line # echo replacement: $line
mykey=$( echo "$line" | cut -f 1 -d '=' ) mykey=$( echo "$line" | cut -f 1 -d '=' )
...@@ -416,6 +419,7 @@ function _getreplaces(){ ...@@ -416,6 +419,7 @@ function _getreplaces(){
echo -e "s#{{$mykey}}#${myvalue}#g" echo -e "s#{{$mykey}}#${myvalue}#g"
done done
done
} }
# loop over all files in templates subdir make replacements and generate # loop over all files in templates subdir make replacements and generate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment