Skip to content

Commit

Permalink
ignore blank lines in arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
biskyt committed Nov 4, 2021
1 parent bf87cbc commit 2ba2a51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protected/scripts/backupdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ DONT_CALCULATE_LIST=""
EXCLUDED_TABLES_STRING=''
for TABLE in "${EXCLUDED_TABLES[@]}"; do
:
if [ "${TABLE}" != "ignore_none" ]; then
if [ "${TABLE}" != "ignore_none" ] && [ -n "$TABLE" ]; then
echo "Excluding data for: ${DATABASE}.${TABLE}"
EXCLUDED_TABLES_STRING+=" --ignore-table=${DATABASE}.${TABLE}"
DONT_CALCULATE_LIST+="'${TABLE}', "
Expand All @@ -149,7 +149,7 @@ done
IGNORED_TABLES_STRING=''
for TABLE in "${IGNORED_TABLES[@]}"; do
:
if [ "${TABLE}" != "ignore_none" ]; then
if [ "${TABLE}" != "ignore_none" ] && [ -n "$TABLE" ]; then
echo "Ignoring: ${DATABASE}.${TABLE}"
IGNORED_TABLES_STRING+=" --ignore-table=${DATABASE}.${TABLE}"
DONT_CALCULATE_LIST+="'${TABLE}', "
Expand Down

0 comments on commit 2ba2a51

Please sign in to comment.