This commit is contained in:
Yhael S
2023-10-17 22:10:08 -05:00
parent 53ee5f8565
commit 8a1844cfa1
2 changed files with 4 additions and 3 deletions

View File

@@ -5,9 +5,6 @@ set -e
# Define the path to the example configuration file
TEMPLATE_CONF="odoo.conf"
# Copy the example conf to the destination to start replacing the variables
cp "$TEMPLATE_CONF" "$ODOO_RC"
# First pass: Evaluate any nested variables within .env file and export them
while IFS='=' read -r key value || [[ -n $key ]]; do
# Skip comments and empty lines
@@ -23,6 +20,9 @@ while IFS='=' read -r key value || [[ -n $key ]]; do
export "$key=$value"
done < .env
# Copy the example conf to the destination to start replacing the variables
cp "$TEMPLATE_CONF" "$ODOO_RC"
# Second pass: Replace the variables in $ODOO_RC
while IFS='=' read -r key value || [[ -n $key ]]; do
# Skip comments and empty lines