Skip to content
Snippets Groups Projects
Verified Commit e76a2cdc authored by Daniel Hornung's avatar Daniel Hornung
Browse files

WIP: CI for mysql: Multiline environment variables.

parent f6eb9131
Branches
Tags
2 merge requests!7Release v5.0.0,!4CI pipeline for mysql unit tests
Pipeline #9816 failed
...@@ -34,7 +34,12 @@ if [ -z "$MAINPATH" ]; then ...@@ -34,7 +34,12 @@ if [ -z "$MAINPATH" ]; then
fi fi
# Make a backup of the important environment variables. # Make a backup of the important environment variables.
my_env=$(export -p | grep -E '(MYSQL|DATABASE)' || true) # Take care: Assignments may be more than one line!
_expr="(MYSQL|DATABASE)"
my_env=$(export -p | awk '/^declare -x '"$_expr"'/ {PRINT=1} \
/^declare -x/ && !/^declare -x '"$_expr"'/ {PRINT=0} \
PRINT {print}' \
|| true)
source "$MAINPATH/config.defaults" source "$MAINPATH/config.defaults"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment