Created
April 1, 2021 13:32
Unexpand the "svn:id" SVN property ($Id$)
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
#!/bin/bash | |
# Unexpand the "svn:id" SVN property ($Id$) | |
# | |
# Anywhere the expanded "$Id$" string (eg. "$Id: Foobar.php 42 1970-01-01 00:00:00Z jdoe$") | |
# is found, it is replaced by "$Id". | |
# Usefull to quickly compare code file-by-file | |
DIR="$1" | |
grep \ | |
--recursive \ | |
--files-with-matches \ | |
--binary-files=without-match \ | |
'$Id:' "$DIR" \ | |
| xargs \ | |
sed \ | |
--regexp-extended \ | |
--in-place \ | |
's/\$Id: .*\$/\$Id\$/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found this script in a 5 years old file of mine and figured I would share it.