summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de>2014-02-03 13:15:46 +0100
committerPaul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de>2014-02-03 13:15:46 +0100
commiteb700e71f0ab89f16aabefea8d190a33beb50fcc (patch)
tree8011a4fce747e2982d303b940eea4c5cd9e63f60
parent74663a07dd85b3e2f06685e26011edbee3f6af6b (diff)
Add rename sample
-rw-r--r--docs/foo.117
-rw-r--r--docs/foo.pod11
-rw-r--r--docs/foo.txt11
3 files changed, 24 insertions, 15 deletions
diff --git a/docs/foo.1 b/docs/foo.1
index 0ab1f9b..57ca229 100644
--- a/docs/foo.1
+++ b/docs/foo.1
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "FOO 1"
-.TH FOO 1 "2013-03-22" "foo 0.0.0.0" "User Commands"
+.TH FOO 1 "2014-02-03" "foo 0.0.0.0" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -236,16 +236,19 @@ in order to build ./docs/foo.1. The page will be included in the resulting debia
.Ve
.SS "Renaming foo into your project name"
.IX Subsection "Renaming foo into your project name"
-Rename all files which have *foo* included into your own new package name. You can find them with
+Rename all files which have *foo* included into your own new package name. You can do that with:
.PP
-.Vb 1
-\& find . \-name \e*foo\e*
+.Vb 3
+\& PROJECTNAME=yourproject
+\& find . \-name \e*foo\e* |
+\& while read foo; do git mv $foo ${foo/foo/$PROJECTNAME}; done
.Ve
.PP
-Search all content and rename *foo* into your own new package name. You can find all files with
+Search all content and rename *foo* into your own new package name. You can do that with:
.PP
-.Vb 1
-\& grep \-R foo . | grep \-v .git
+.Vb 2
+\& grep \-R foo . | grep \-v .git |
+\& cut \-d: \-f1 | uniq | xargs sed \-i "s/foo/$PROJECTNAME/g"
.Ve
.SS "Updating ./debian"
.IX Subsection "Updating ./debian"
diff --git a/docs/foo.pod b/docs/foo.pod
index c4cadb9..5afff25 100644
--- a/docs/foo.pod
+++ b/docs/foo.pod
@@ -90,13 +90,16 @@ in order to build ./docs/foo.1. The page will be included in the resulting debia
=head2 Renaming foo into your project name
-Rename all files which have *foo* included into your own new package name. You can find them with
+Rename all files which have *foo* included into your own new package name. You can do that with:
- find . -name \*foo\*
+ PROJECTNAME=yourproject
+ find . -name \*foo\* |
+ while read foo; do git mv $foo ${foo/foo/$PROJECTNAME}; done
-Search all content and rename *foo* into your own new package name. You can find all files with
+Search all content and rename *foo* into your own new package name. You can do that with:
- grep -R foo . | grep -v .git
+ grep -R foo . | grep -v .git |
+ cut -d: -f1 | uniq | xargs sed -i "s/foo/$PROJECTNAME/g"
=head2 Updating ./debian
diff --git a/docs/foo.txt b/docs/foo.txt
index 7f01494..bf913ac 100644
--- a/docs/foo.txt
+++ b/docs/foo.txt
@@ -89,14 +89,17 @@ Customize
Renaming foo into your project name
Rename all files which have *foo* included into your own new package
- name. You can find them with
+ name. You can do that with:
- find . -name \*foo\*
+ PROJECTNAME=yourproject
+ find . -name \*foo\* |
+ while read foo; do git mv $foo ${foo/foo/$PROJECTNAME}; done
Search all content and rename *foo* into your own new package name. You
- can find all files with
+ can do that with:
- grep -R foo . | grep -v .git
+ grep -R foo . | grep -v .git |
+ cut -d: -f1 | uniq | xargs sed -i "s/foo/$PROJECTNAME/g"
Updating ./debian
Edit the following files accordingly to your new project (e.g. with