Commit 3d3317c5 authored by Michał 'rysiek' Woźniak's avatar Michał 'rysiek' Woźniak
Browse files

bugfixes

parent 1a3ef51d
......@@ -38,4 +38,4 @@ fi
[ "$TARGET_DIR" = "" ] && display_error_and_quit "Not a valid target directory: '$TARGET_DIR'"
# run the dumper
"dump_${DB_TYPE}_dbs" "$DB_HOST" "$DB_USER" "$DB_PASS" "$TARGET_DIR" "${SSH_ORIGINAL_COMMAND_ARR:5}"
\ No newline at end of file
"dump_${DB_TYPE}_dbs" "$DB_HOST" "$DB_USER" "$DB_PASS" "$TARGET_DIR" "${SSH_ORIGINAL_COMMAND_ARR[@]:5}"
\ No newline at end of file
......@@ -179,8 +179,8 @@ function dump_mysql_dbs {
# if we had a list of databases, did we find all of them?
# rationale: if we have a specific list of databases, we *expect* them to be dumped
# if we cannot find some of them, that should be clearly signalled
if [ ! -z ${5+x} ]; then
DATABASES_MISSING="$( echo "${@:5} $DATABASES" | tr ' ' '\n' | sort | uniq -u )"
if [ ! -z ${5+x} ] && [ "$5" != "" ]; then
DATABASES_MISSING="$( echo "${@:5} $DATABASES" | tr ' ' '\n' | sort | uniq -u | tr '\n' ' ' )"
if [[ "$DATABASES_MISSING" != "" ]]; then
# if not, complain and exit
display_error_and_quit "Not all databases found; missing: $DATABASES_MISSING"
......@@ -412,7 +412,7 @@ function dump_postgres_dbs {
# rationale: if we have a specific list of databases, we *expect* them to be dumped
# if we cannot find some of them, that should be clearly signalled
if [ ! -z ${5+x} ] && [ "$5" != "" ]; then
DATABASES_MISSING="$( echo "${@:5} $DATABASES" | tr ' ' '\n' | sort | uniq -u )"
DATABASES_MISSING="$( echo "${@:5} $DATABASES" | tr ' ' '\n' | sort | uniq -u | tr '\n' ' ' )"
if [[ "$DATABASES_MISSING" != "" ]]; then
# if not, complain and exit
display_error_and_quit "Not all databases found; missing: $DATABASES_MISSING"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment