Forked from jstruzik/copyright_doc_update_git_diff.sh
Last active
May 11, 2016 20:37
-
-
Save Rican7/ad2e31d2c5fbd05cb221de303d32747b to your computer and use it in GitHub Desktop.
Update copyright date only for modified files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using GNU `sed` | |
git diff --diff-filter=ACMRTUXB --name-only branch_to_compare | xargs sed -i -r "s/copyright(\s+)[0-9]{4}/copyright\1"$(date "+%Y")"/g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment