Permalink
Browse files

Refactor sync script.

  • Loading branch information...
reitermarkus committed Nov 12, 2018
1 parent f9cd259 commit 14af394a7b564e030ad9a74899e6a3692f00f55c
Showing with 14 additions and 9 deletions.
  1. +14 −9 developer/bin/sync_cask_tap_templates
@@ -34,15 +34,20 @@ function copy_templates {
local repo_name
repo_name="${1}"
rsync --archive --prune-empty-dirs --delete \
--include '.editorconfig' \
--include '.gitattributes' \
--include '.github/***' \
--include '.gitignore' \
--include '.travis.yml' \
--include 'Casks/.rubocop.yml' \
--include 'CODE_OF_CONDUCT.md' \
--exclude '*' "${main_repo_dir}/" '.'
for file in \
.editorconfig \
.gitattributes \
.github \
.gitignore \
.travis.yml \
Casks/.rubocop.yml \
CODE_OF_CONDUCT.md \
; do
rm -rf "${file}"
cp -r "${main_repo_dir}/${file}" "${file}"
done
rm '.github/ISSUE_TEMPLATE/02_feature_request.md' # Feature requests only make sense in the main repo
/usr/bin/sed -i '' -E "s:homebrew-cask/(pulls|issues|search):${repo_name}/\1:" '.github/PULL_REQUEST_TEMPLATE.md' # PULL_REQUEST_TEMPLATE has repo-specific links
}

0 comments on commit 14af394

Please sign in to comment.