diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-27 13:10:06 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-27 13:10:06 +0000 |
commit | 62aa7ed050aea99a989c95f16814568cdce5b315 (patch) | |
tree | b23e5ff4f43ecb6d08e6eb0c63d6dcd14622f401 | |
parent | 0107c41aeeb482cc383e81f082a3b65956c25293 (diff) | |
download | perl-62aa7ed050aea99a989c95f16814568cdce5b315.tar.gz |
Reindent bash functions properly
p4raw-id: //depot/perl@31101
-rw-r--r-- | pod/perlhack.pod | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pod/perlhack.pod b/pod/perlhack.pod index 3d0878e194..f68462779c 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -528,18 +528,18 @@ Bourne shell script functions that can make your life easier: function edit { if [ -L $1 ]; then mv $1 $1.orig - cp $1.orig $1 - vi $1 + cp $1.orig $1 + vi $1 else - /bin/vi $1 - fi + vi $1 + fi } function unedit { if [ -L $1.orig ]; then rm $1 - mv $1.orig $1 - fi + mv $1.orig $1 + fi } Replace "vi" with your favorite flavor of editor. @@ -549,15 +549,15 @@ files which have been edited in your symlink tree: mkpatchorig() { local diffopts - for f in `find . -name '*.orig' | sed s,^\./,,` - do - case `echo $f | sed 's,.orig$,,;s,.*\.,,'` in - c) diffopts=-p ;; + for f in `find . -name '*.orig' | sed s,^\./,,` + do + case `echo $f | sed 's,.orig$,,;s,.*\.,,'` in + c) diffopts=-p ;; pod) diffopts='-F^=' ;; *) diffopts= ;; - esac - diff -du $diffopts $f `echo $f | sed 's,.orig$,,'` - done + esac + diff -du $diffopts $f `echo $f | sed 's,.orig$,,'` + done } This function produces patches which include enough context to make |