From fb2aaf4d9ad2881dc0bf6a99d55d252a2dae8200 Mon Sep 17 00:00:00 2001
From: Timm Fitschen <timm.fitschen@ds.mpg.de>
Date: Wed, 19 Dec 2018 23:04:04 +0100
Subject: [PATCH] BUG: source .config

---
 patches/utils/patch_header.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/patches/utils/patch_header.sh b/patches/utils/patch_header.sh
index 7ef8a94..1ce4972 100644
--- a/patches/utils/patch_header.sh
+++ b/patches/utils/patch_header.sh
@@ -21,7 +21,12 @@
 # ** end header
 #
 #header for patch scripts
-source .config
+if test -e ../.config ; then
+    source ../.config
+fi
+if test -e .config ; then
+    source .config
+fi
 USAGE="$1 --database=DATABASE_NAME [ --login-path=LOGIN_PATH | --user=USER [ --password=PASSWORD ] ]\n\n"
 CMD_OPTIONS="options:\n\n-h, --help\n\tShow brief help.\n-l LOGIN_PATH, --login-path=LOGIN_PATH\n\tA login-path for the mysql connection (see 'man mysql' and 'man mysql-config-editor').\n-u USER, --user=USER\n\tA mysql user.\n-p PASSWORD, --password=PASSWORD\n\tThe password for the mysql user.\n"
 set -e
-- 
GitLab