3 # this script embeds the global revision number in document(s) given
5 # document should have __SVN_REVISION__ where it wants the revision
6 # number to be placed. Wildcards okay.
9 echo " Invalid usage. Must supply one or more files."
12 revision_number=$(svn info | grep Revision | cut -c11-)
13 echo " Revision number is $revision_number"
16 for curfile in $(grep -H "__SVN_REVISION__" -r "$1" | cut -d':' -f1 | sed '/\.svn\//d'); do
17 echo " Processing $curfile ..."
18 sed -i -e "s/__SVN_REVISION__/$revision_number/" "$curfile"