From 22ba5ed823418379b34e7033a58837407fbfc4e9 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 13 Jan 2023 11:26:19 +0100 Subject: [PATCH] declare bash arrays --- client/zzz_evobackup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/zzz_evobackup b/client/zzz_evobackup index 1d49d8a..22b6b68 100755 --- a/client/zzz_evobackup +++ b/client/zzz_evobackup @@ -823,9 +823,9 @@ sync_tasks() { # default paths, depending on system if [ "${SYSTEM}" = "linux" ]; then - rsync_default_includes=(/bin /boot /lib /opt /sbin /usr) + declare -a rsync_default_includes=(/bin /boot /lib /opt /sbin /usr) else - rsync_default_includes=(/bsd /bin /sbin /usr) + declare -a rsync_default_includes=(/bsd /bin /sbin /usr) fi if [ -f "${CANARY_FILE}" ]; then rsync_default_includes+=("${CANARY_FILE}") @@ -853,7 +853,7 @@ sync_tasks() { # Dump filesystem stats with mtree log "SYNC_TASKS - start mtree" - mtree_files=() + declare -a mtree_files=() # Loop over Rsync includes while read -r line ; do @@ -1007,7 +1007,7 @@ main() { # Initialize a list of files to delete at exit # Any file added to the list will also be deleted at exit - temp_files=("${PIDFILE}") + declare -a temp_files=("${PIDFILE}") trap clean_temp_files EXIT