Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-mysqlbackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-mysqlbackend
Commits
1eb3290c
Commit
1eb3290c
authored
5 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: configure is obsolete
parent
d8a3822b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure
+2
-68
2 additions, 68 deletions
configure
with
2 additions
and
68 deletions
configure
+
2
−
68
View file @
1eb3290c
...
@@ -22,74 +22,8 @@
...
@@ -22,74 +22,8 @@
# ** end header
# ** 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"
echo
"CURRENTLY NOT SUPPORTET"
exit
1
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
\n
LOGIN_PATH"
)
$MYSQL_CONFIG_EDITOR_CMD
remove
--login-path
=
$LOGIN_PATH
printf
"
\n
For user
$MYSQL_USER
- "
$MYSQL_CONFIG_EDITOR_CMD
set
--login_path
=
$LOGIN_PATH
--host
=
$MYSQL_HOST
--user
=
root
--password
else
printf
"
\n
Because 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
\n
MYSQL_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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment