From 1eb3290c0705b2db663d805b6fccc53adda305e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <henrik@trineo.org>
Date: Tue, 7 Apr 2020 13:22:34 +0200
Subject: [PATCH] MAINT: configure is obsolete

---
 configure | 70 ++-----------------------------------------------------
 1 file changed, 2 insertions(+), 68 deletions(-)

diff --git a/configure b/configure
index fa76621..3336e74 100755
--- a/configure
+++ b/configure
@@ -22,74 +22,8 @@
 # ** end header
 #
 
+# Do to the new way environment variables are handled and how config files are
+# read, this file is obsolete
 echo "CURRENTLY NOT SUPPORTET"
 exit 1
 
-if [ -z "$UTILSPATH" ]; then
-    UTILSPATH="$(realpath $(dirname $0)/utils)"
-    export UTILSPATH
-fi
-
-# defaults
-source config.defaults
-OPTIONS=$(sed -r '/^(#|\s*$)/d' config.defaults | sed -r 's/=.*$//g')
-
-# override with old config
-if [ -e $MAINPATH/.config ]; then
-    source $MAINPATH/.config
-fi
-
-# DEBUG - print all options:
-# for opt in $OPTIONS; do echo $opt = ${!opt}; done
-
-# Promt the user to specify an option.
-for opt in $OPTIONS; do
-    opt_default=$(echo "${!opt}" | sed 's/#.*$//g')
-    read -p "$opt [$opt_default]: " val
-    if [ ! ${#val} -eq 0 ]; then
-        eval "$opt=\"$val\""
-    fi
-done
-
-# check all options
-printf "\n\n--- checking your configuration ---"
-for opt in $OPTIONS; do
-    if [ -z "$opt" ]; then echo "${!opt} is not defined." ; fi ;
-    if [ "CMD" = "${opt:(-3)}" ]; then
-        printf "\n${opt} "
-        if test $(command -v ${!opt}) ; then
-            printf ". . . [OK]"
-        else
-            printf ". . . [FAILURE - could not find ${!opt}]"
-        fi
-    fi
-done
-printf "\n"
-
-
-printf "\n\n--- finishing up ---"
-if test $(command -v ${MYSQL_CONFIG_EDITOR_CMD}) ; then
-    LOGIN_PATH=caosdb_login_to_$DATABASE_NAME
-    OPTIONS=$(printf "$OPTIONS\nLOGIN_PATH")
-    $MYSQL_CONFIG_EDITOR_CMD remove --login-path=$LOGIN_PATH
-    printf "\nFor user $MYSQL_USER - "
-    $MYSQL_CONFIG_EDITOR_CMD set --login_path=$LOGIN_PATH --host=$MYSQL_HOST --user=root --password
-else
-    printf "\nBecause there is no mysql_config_editor avaible, we need the password for the mysql user '$MYSQL_USER'.\n"
-    read -p "MYSQL_USER_PASSWORD []: " MYSQL_USER_PASSWORD
-    OPTIONS=$(printf "$OPTIONS\nMYSQL_USER_PASSWORD")
-fi
-
-
-# DEBUG - print all options:
-# for opt in $OPTIONS; do echo $opt = ${!opt}; done
-
-# write to $MAINPATH/.config
-rm -f $MAINPATH/.config
-for opt in $OPTIONS; do
-    esc_hash=${!opt//#/\\\#}
-    esc_dollar=${esc_hash//\$/'$$'}
-    esc_dq=${esc_dollar//\"/\\\"}
-    esc_sq=${esc_dq//\'/\\\'}
-    echo "$opt=\"$esc_sq\"" >> $MAINPATH/.config
-done
-- 
GitLab