sync_templates_and_ci: use rsync (#24341)

* sync_templates_and_ci: use rsync

rsync allows us to delete files present at the destination but
not the source.

Also split arguments into multiple lines for readability/maintainability.

* Collapse rsync argument list
This commit is contained in:
Josh Hagins
2016-09-08 15:26:14 -04:00
committed by GitHub
parent 852607aafe
commit 4b6d5b983f
+1 -1
View File
@@ -31,7 +31,7 @@ function copy_templates_and_ci {
local repo_name
repo_name="${1}"
cp -R "${main_repo_dir}/.github" "${main_repo_dir}/.travis.yml" "${main_repo_dir}/ci" '.'
rsync --archive --delete "${main_repo_dir}"/{.github,.travis.yml,ci} '.'
/usr/bin/sed -i '' -E "s:homebrew-cask/(pulls|issues):${repo_name}/\1:" '.github/PULL_REQUEST_TEMPLATE.md' # PULL_REQUEST_TEMPLATE has repo-specific links
}