Given this piece of bash:
PARMS='-rvu'
PARMS+=" --delete --exclude='.git'"
echo $PARMS
rsync ${PARMS} . ${TARGET}
The echo shows the PARMS string as expected, no error is displayed, but rsync silently acts as if the options added by the += did not exist. However, this works as expected:
PARMS='-rvu'
rsync ${PARMS} --delete --exclude='.git' . ${TARGET}
I guess I screwed something up with bash quotes (always had problems with those), but not exactly sure what and why are the options ignored even though the string seems to have been built correctly.
echo "$PARMS"
andrsync "${PARMS}"
... – jasonwryan Aug 28 '14 at 07:37bash
version 4.2.25 without any changes. – Anthon Aug 28 '14 at 07:41