declare bash arrays
This commit is contained in:
parent
7f4cb78826
commit
22ba5ed823
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue