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
652e003f
Commit
652e003f
authored
5 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: moved helper scripts to utils folder
parent
40b0d36a
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
patches/utils/patch_header.sh
+2
-2
2 additions, 2 deletions
patches/utils/patch_header.sh
utils/backup.sh
+5
-6
5 additions, 6 deletions
utils/backup.sh
utils/helpers.sh
+0
-0
0 additions, 0 deletions
utils/helpers.sh
utils/load_settings.sh
+2
-2
2 additions, 2 deletions
utils/load_settings.sh
with
9 additions
and
10 deletions
patches/utils/patch_header.sh
+
2
−
2
View file @
652e003f
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
#
#
#header for patch scripts
#header for patch scripts
.
../../load_settings.sh
.
../../
utils/
load_settings.sh
.
../../utils.sh
.
../../utils
/helpers
.sh
USAGE
=
"
$1
[ --env=ENV_FILE ] [ --patch=PATCH ] [ --backupdir=BACKUPDIR ]
\n\n
"
USAGE
=
"
$1
[ --env=ENV_FILE ] [ --patch=PATCH ] [ --backupdir=BACKUPDIR ]
\n\n
"
CMD_OPTIONS
=
$(
cat
<<
EOF
CMD_OPTIONS
=
$(
cat
<<
EOF
...
...
This diff is collapsed.
Click to expand it.
utils/backup.sh
+
5
−
6
View file @
652e003f
...
@@ -58,12 +58,11 @@ backup:
...
@@ -58,12 +58,11 @@ backup:
EOF
EOF
)
)
# Config and command line parameter loading ###################################
# Load settings from .config and defaults #####################################
.
../load_settings.sh
.
../.config
# load useful functions #######################################################
.
helpers.sh
# load useful stuff - parses the commandline parameters and so on...
.
../patches/utils/patch_header.sh
function
backup
()
{
function
backup
()
{
NARG_NAME
=
"
$1
"
NARG_NAME
=
"
$1
"
...
@@ -75,7 +74,7 @@ function backup() {
...
@@ -75,7 +74,7 @@ function backup() {
failure
"dumpfile already exists."
failure
"dumpfile already exists."
fi
fi
echo
"Dumping database
$NARG_NAME
to
$NARG_FILE
... "
echo
"Dumping database
$NARG_NAME
to
$NARG_FILE
... "
$
CMD_
MYSQL
_
DUMP
$MYSQL_CONNECTION_NO_DB
$*
--opt
--default-character-set
=
utf8
--routines
\
$MYSQLDUMP
_CMD
$MYSQL_CONNECTION_NO_DB
$*
--opt
--default-character-set
=
utf8
--routines
\
"
$NARG_NAME
"
>
"
$NARG_FILE
"
"
$NARG_NAME
"
>
"
$NARG_FILE
"
if
[[
"
$YAML
"
==
"true"
]]
;
then
if
[[
"
$YAML
"
==
"true"
]]
;
then
...
...
This diff is collapsed.
Click to expand it.
utils.sh
→
utils
/helpers
.sh
+
0
−
0
View file @
652e003f
File moved
This diff is collapsed.
Click to expand it.
load_settings.sh
→
utils/
load_settings.sh
+
2
−
2
View file @
652e003f
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
# You should have received a copy of the GNU Affero General Public License
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
[[
-n
"config.defaults"
]]
&&
source
"config.defaults"
[[
-n
"
../
config.defaults"
]]
&&
source
"
../
config.defaults"
[[
-n
".config"
]]
&&
source
".config"
[[
-n
".
./.
config"
]]
&&
source
".
./.
config"
[[
-n
"
$ENV_FILE
"
]]
&&
source
"
$ENV_FILE
"
[[
-n
"
$ENV_FILE
"
]]
&&
source
"
$ENV_FILE
"
if
[[
-z
"
$DATABASE_NAME
"
&&
-z
"
$MYSQL_CONNECTION
"
]]
if
[[
-z
"
$DATABASE_NAME
"
&&
-z
"
$MYSQL_CONNECTION
"
]]
...
...
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