Last active
August 29, 2015 14:17
-
-
Save jirikuncar/71c187adaa125148039d to your computer and use it in GitHub Desktop.
git: update year
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
COMMIT=$1 | |
YEAR=`date +"%Y"` | |
START=${YEAR:0:3} | |
END=${YEAR:3:4} | |
CMD="sed -i '' 's/\($START[^$END]\) CERN\.$/\1, $YEAR CERN./'" | |
echo $CMD `git diff-tree --no-commit-id --name-only -r $COMMIT` | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment