OTHER_OPTS="--verbose --stats"
# Options we only use in the first pass, where we do not want packages/sources to fly in yet and dont want to delete files
-PASS1="--exclude Packages\* --exclude Sources\* --exclude Release\* --exclude InRelease --exclude i18n/\* --exclude ls-lR\*"
+PASS1=(--exclude Packages\* --exclude Sources\* --exclude Release\* --exclude InRelease --exclude i18n/\* --exclude ls-lR\*)
# Options for the second pass, where we do want everything, including deletion of old and now unused files
PASS2="--max-delete=40000 --delay-updates --delete --delete-after --delete-excluded --exclude \"project/trace/${HOSTNAME}\""
# world-readable remotely. Always exclude it to avoid errors.
EXCLUDE="--exclude .~tmp~/"
-rsync ${RSYNC_OPTS} ${OTHER_OPTS} ${PASS1} ${EXCLUDE} ${RSYNCSOURCE} ${BASEDIR}
+rsync ${RSYNC_OPTS} ${OTHER_OPTS} "${PASS1[@]}" ${EXCLUDE} ${RSYNCSOURCE} ${BASEDIR}
rsync ${RSYNC_OPTS} ${OTHER_OPTS} ${PASS2} ${EXCLUDE} ${RSYNCSOURCE} ${BASEDIR}
mkdir -p ${BASEDIR}/project/trace
OTHER_OPTS="--verbose --stats"
# Options we only use in the first pass, where we do not want packages/sources to fly in yet and dont want to delete files
-PASS1="--exclude Packages\* --exclude Sources\* --exclude Release\* --exclude ls-lR\*"
+PASS1=(--exclude Packages\* --exclude Sources\* --exclude Release\* --exclude ls-lR\*)
# Options for the second pass, where we do want everything, including deletion of old and now unused files
PASS2="--max-delete=40000 --delay-updates --delete --delete-after --delete-excluded --exclude \"project/trace/${HOSTNAME}\""
# world-readable remotely. Always exclude it to avoid errors.
EXCLUDE="--exclude .~tmp~/"
-rsync ${RSYNC_OPTS} ${OTHER_OPTS} ${PASS1} ${EXCLUDE} ${RSYNCSOURCE} ${BASEDIR}
+rsync ${RSYNC_OPTS} ${OTHER_OPTS} "${PASS1[@]}" ${EXCLUDE} ${RSYNCSOURCE} ${BASEDIR}
rsync ${RSYNC_OPTS} ${OTHER_OPTS} ${PASS2} ${EXCLUDE} ${RSYNCSOURCE} ${BASEDIR}
mkdir -p ${BASEDIR}/project/trace