Remove the scriptz submodule and hard-commit the files.
The submodule is a leftover from when this project was intended to work as a series of microservices. It was meant to provide common functionality to the builds for every microservice. That's no longer the case, and the submodule is a pain-point both in on-boarding new developers and running the Docker build.
This commit is contained in:
15
script/include/get_db_settings_functions.inc.sh
Normal file
15
script/include/get_db_settings_functions.inc.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
# set_db_env_vars.inc.sh: Functions used by the set_db_env_vars script
|
||||
|
||||
set_db_env_vars () {
|
||||
local config_file="${1}"
|
||||
|
||||
# Read in and export all name=value pairs where the name starts with PG
|
||||
# unless we already have an env var with that value
|
||||
# (NOTE: all whitespaces are removed from each line)
|
||||
while read -r DBVAR
|
||||
do
|
||||
if ! $(env | grep -qFle "${DBVAR%%=*}"); then
|
||||
eval "export ${DBVAR}"
|
||||
fi
|
||||
done < <(grep -Ee '^PG' "${config_file}" | sed 's/ //g')
|
||||
}
|
Reference in New Issue
Block a user