This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 466 by dpavlin, Wed Nov 19 19:27:38 2008 UTC revision 554 by dpavlin, Thu Nov 27 17:37:52 2008 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
3  # rename methods  from='params_form';
4    to='as_markup'
6  perl -p -i -n -e 's/sub markup/sub as_markup/'  `grep -lr 'sub markup' lib t`  echo "rename method $from -> $to"
 perl -p -i -n -e 's/sub data/sub as_data/'      `grep -lr 'sub data' lib t`  
 perl -p -i -n -e 's/sub sponge/sub as_sponge/'  `grep -lr 'sub sponge' lib t`  
8  perl -p -i -n -e 's/->markup/->as_markup/'      `grep -lr -- '->markup' lib t`  grep -lr $from lib t etc | xargs --verbose -i sh -c "perl -p -i -n -e 's{(sub |->|/)$from}{\1$to}g' {}" && (
9  perl -p -i -n -e 's/->data/->as_data/'          `grep -lr -- '->data' lib t`          svk diff | vi -R -
10  perl -p -i -n -e 's/->sponge/->as_sponge/'      `grep -lr -- '->sponge' lib t`  )
 perl -p -i -n -e 's!/markup!/as_markup!'        `grep -lr -- '/markup' lib t etc`  
 perl -p -i -n -e 's!/data!/as_data!'            `grep -lr -- '/data' lib t etc`  
 perl -p -i -n -e 's!/sponge!/as_sponge!'        `grep -lr -- '/sponge' lib t etc`  

Removed from v.466  
changed lines
  Added in v.554

  ViewVC Help
Powered by ViewVC 1.1.26