/[Frey]/trunk/bin/rename-method.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/bin/rename-method.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1157 - (hide annotations)
Thu Jul 2 15:29:41 2009 UTC (14 years, 9 months ago) by dpavlin
File MIME type: application/x-sh
File size: 269 byte(s)
added parameters for old and new method name
1 dpavlin 466 #!/bin/sh
2    
3 dpavlin 1157 test -z "$1" -o -z "$2" && echo "usage: $0 old_method new_method" && exit
4 dpavlin 466
5 dpavlin 1157 from=$1
6     to=$2
7 dpavlin 466
8 dpavlin 1157 echo "# rename method $from -> $to"
9    
10 dpavlin 554 grep -lr $from lib t etc | xargs --verbose -i sh -c "perl -p -i -n -e 's{(sub |->|/)$from}{\1$to}g' {}" && (
11     svk diff | vi -R -
12     )

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26