diff --git a/src/lib/handlers/sources/mysqldump.sh b/src/lib/handlers/sources/mysqldump.sh index ced16e6..16e9f7c 100644 --- a/src/lib/handlers/sources/mysqldump.sh +++ b/src/lib/handlers/sources/mysqldump.sh @@ -63,7 +63,7 @@ src_mysqldump() { log "Run command: $*" # shellcheck disable=SC2154 - if "$@" 2>> "$__log_file" > "$sqldump"; then + if "$@" 2>> "$log_file" > "$sqldump"; then # Compress file sqldump="$(compress_file "$sqldump")" # Append path to 'backups' array diff --git a/src/lib/handlers/sources/pg_dump.sh b/src/lib/handlers/sources/pg_dump.sh index 22d6278..0ac2f26 100644 --- a/src/lib/handlers/sources/pg_dump.sh +++ b/src/lib/handlers/sources/pg_dump.sh @@ -64,7 +64,7 @@ src_pg_dump() { log "Run command: $*" # shellcheck disable=SC2154 - if "$@" 2>> "$__log_file" > "$sqldump"; then + if "$@" 2>> "$log_file" > "$sqldump"; then # Compress dump sqldump="$(compress_file "$sqldump")" # Append path to 'backups' array diff --git a/src/lib/handlers/sources/tar.sh b/src/lib/handlers/sources/tar.sh index 75488c1..90a77b5 100644 --- a/src/lib/handlers/sources/tar.sh +++ b/src/lib/handlers/sources/tar.sh @@ -86,7 +86,7 @@ src_tar() { log "Run command: $*" # shellcheck disable=SC2154 - if "$@" 2>> "$__log_file"; then + if "$@" 2>> "$log_file"; then # Append path to 'backups' array backups+=("$archive") else diff --git a/src/lib/handlers/targets/cp.sh b/src/lib/handlers/targets/cp.sh index 240b66e..1ebce1e 100644 --- a/src/lib/handlers/targets/cp.sh +++ b/src/lib/handlers/targets/cp.sh @@ -60,7 +60,7 @@ tgt_cp() { log "Run command: $*" - if "$@" 2>> "$__log_file"; then + if "$@" 2>> "$log_file"; then : # Success else handle_error \ diff --git a/src/lib/lib.sh b/src/lib/lib.sh index 3d63d85..f7b22c0 100644 --- a/src/lib/lib.sh +++ b/src/lib/lib.sh @@ -29,6 +29,4 @@ LIBRARY="${LIBRARY:-./lib}" . "$LIBRARY/handlers/targets/cp.sh" . "$LIBRARY/handlers/targets/s3cmd.sh" -if [ -f "$LIBRARY/extra.sh" ]; then - . "$LIBRARY/extra.sh" -fi +[ -f "$LIBRARY/extra.sh" ] && . "$LIBRARY/extra.sh"