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
f351aceb
Unverified
Commit
f351aceb
authored
5 years ago
by
Daniel
Browse files
Options
Downloads
Patches
Plain Diff
FIX: More strinct error handling, message if commands are not found.
parent
0338357e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config.defaults
+5
-4
5 additions, 4 deletions
config.defaults
utils/load_settings.sh
+11
-5
11 additions, 5 deletions
utils/load_settings.sh
utils/make_db
+2
-2
2 additions, 2 deletions
utils/make_db
with
18 additions
and
11 deletions
config.defaults
+
5
−
4
View file @
f351aceb
...
...
@@ -23,13 +23,14 @@
# # Commands
# The MySQL client program.
MYSQL_CMD=$(command -v mysql)
MYSQL_CMD=$(command -v mysql
|| echo "mysql not found!" >&2
)
# The mysqladmin program which comes with the MySQL client.
MYSQLADMIN_CMD=$(command -v mysqladmin)
MYSQLADMIN_CMD=$(command -v mysqladmin
|| echo "mysqladmin not found!" >&2
)
# The mysqldump program which comes with the MySQL client.
MYSQLDUMP_CMD=$(command -v mysqldump)
MYSQLDUMP_CMD=$(command -v mysqldump
|| echo "mysqldump not found!" >&2
)
# The mysql_config_editor program which is used to store the credentials.
MYSQL_CONFIG_EDITOR_CMD=$(command -v mysql_config_editor)
MYSQL_CONFIG_EDITOR_CMD=$(command -v mysql_config_editor \
|| echo "mysql_config_editor not found!" >&2)
# # MySQL Connection
# The host of the MySQL server.
...
...
This diff is collapsed.
Click to expand it.
utils/load_settings.sh
+
11
−
5
View file @
f351aceb
...
...
@@ -19,13 +19,19 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Load setting from different files, in this order:
# - config.defaults
# - .config
# - config.defaults
(in the current directory)
# - .config
(in the current directory)
# - The file given in ENV_FILE.
[[
-n
"config.defaults"
]]
&&
source
"config.defaults"
[[
-n
".config"
]]
&&
source
".config"
[[
-n
"
$ENV_FILE
"
]]
&&
source
"
$ENV_FILE
"
if
[[
-r
"config.defaults"
]]
;
then
source
"config.defaults"
fi
if
[[
-r
".config"
]]
;
then
source
".config"
fi
if
[[
-n
"
$ENV_FILE
"
]]
;
then
source
"
$ENV_FILE
"
fi
export
MYSQL_CMD
export
MYSQLDUMP_CMD
...
...
This diff is collapsed.
Click to expand it.
utils/make_db
+
2
−
2
View file @
f351aceb
...
...
@@ -22,6 +22,8 @@
#
# ** end header
set
-e
INSTALL_SQL_FILE
=
"db_2_0.sql"
if
[
-z
"
$UTILSPATH
"
]
;
then
...
...
@@ -29,8 +31,6 @@ if [ -z "$UTILSPATH" ]; then
export
UTILSPATH
fi
set
-e
source
$UTILSPATH
/load_settings.sh
source
$UTILSPATH
/helpers.sh
...
...
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