From aedd6e5e3907f2be5308806a7c3f479ae8c2dfc6 Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Tue, 4 Feb 2020 13:35:51 +0100
Subject: [PATCH] WIP: pipeline

---
 patches/patch20150715-0/patch.sh | 5 -----
 patches/utils/patch_header.sh    | 8 +++-----
 update_sql_procedures.sh         | 2 +-
 3 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/patches/patch20150715-0/patch.sh b/patches/patch20150715-0/patch.sh
index 30a3e7f..7546877 100755
--- a/patches/patch20150715-0/patch.sh
+++ b/patches/patch20150715-0/patch.sh
@@ -24,19 +24,14 @@
 # this patch introduces the mysql stored funtion 'CaosDBVersion' with a initial value of 2.0.0
 # Update mysql schema to version v2.0.0
 
-echo "HERE 5a"
 if [ -z "$UTILSPATH" ]; then
  UTILSPATH="../utils"
 fi
-echo "HERE 5b"
 
-echo "HERE 5c"
 source $UTILSPATH/patch_header.sh
-echo "HERE 5d"
 if test ! $(mysql_execute "Select CaosDBVersion();" > /dev/null) ; then
     uptodate
 fi
-echo "HERE 5e"
 
 # install function CaosDBVersion()
 mysql_execute "CREATE FUNCTION CaosDBVersion() RETURNS VARCHAR(255) DETERMINISTIC RETURN 'v2.0.0';"
diff --git a/patches/utils/patch_header.sh b/patches/utils/patch_header.sh
index 68c4b17..9f7eca9 100644
--- a/patches/utils/patch_header.sh
+++ b/patches/utils/patch_header.sh
@@ -67,8 +67,6 @@ function _print_help() {
   fi
 }
 
-echo $@
-
 while test $# -gt 0; do
  case "$1" in
  -h|--help)
@@ -103,9 +101,9 @@ while test $# -gt 0; do
  esac
 done
 
-echo "HERE header1"
-source $ENV_FILE || echo "Could not source $ENV_FILE"
-echo "HERE header2"
+if [ -n "$ENV_FILE" ] ; then
+    source $ENV_FILE || echo "Could not source '$ENV_FILE'" ;
+fi
 
 if [[ -z "$DATABASE_NAME" && -z "$MYSQL_CONNECTION" ]]
 then
diff --git a/update_sql_procedures.sh b/update_sql_procedures.sh
index 30a2a01..7b0b457 100755
--- a/update_sql_procedures.sh
+++ b/update_sql_procedures.sh
@@ -26,7 +26,7 @@
 
 source patches/utils/patch_header.sh
 
-echo -n "updating rules ... $CMD_MYSQL $MYSQL_CONNECTION"
+echo -n "updating rules ... "
 set -e
 
 mysql_execute "$(sed s/db_2_0/$DATABASE_NAME/g rules.sql)"
-- 
GitLab