diff --git a/configure b/configure index fa76621e5d042c487ef003aee9b902e35d72ed04..3336e74882c193c208e40d45c73c8aa2a042b5c1 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