Skip to content

Commit

Permalink
Add comment for disable filename expansion (globbing)
Browse files Browse the repository at this point in the history
  • Loading branch information
rwinch committed Jan 19, 2024
1 parent 54f0b66 commit 9d51426
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rsync-antora-reference/src/rsync_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ __rsync_docs() {
rsync_opts="-c $rsync_opts$(find $local_path -mindepth 1 -maxdepth 1 \! -name 404.html \! -name '.*' -type f -printf ' --include /%P')"
rsync_opts="$rsync_opts$(find $local_path -mindepth 1 -maxdepth 1 -type d \! -name _ -printf ' --include /%P --include /%P/**') --exclude **"
fi
# Disable filename expansion (globbing)
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
set -f
rsync $rsync_opts -e "ssh -i $ssh_private_key_path" $local_path/ "$ssh_host:$ssh_host_path"
set +f
Expand Down

0 comments on commit 9d51426

Please sign in to comment.