Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-weightadjust
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-weightadjust
Commits
16bbf23c
Commit
16bbf23c
authored
Dec 08, 2016
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename uppercase occurrences
parent
b3e5c0f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
README.rst
README.rst
+2
-2
rename-vmod-script
rename-vmod-script
+5
-0
No files found.
README.rst
View file @
16bbf23c
...
@@ -82,8 +82,8 @@ By default, the vmod ``configure`` script installs the built vmod in the
...
@@ -82,8 +82,8 @@ By default, the vmod ``configure`` script installs the built vmod in the
directory relevant to the prefix. The vmod installation directory can be
directory relevant to the prefix. The vmod installation directory can be
overridden by passing the ``vmoddir`` variable to ``make install``.
overridden by passing the ``vmoddir`` variable to ``make install``.
USAGE
EXAMPLE
USAGE
=====
========
=====
In your VCL you could then use this vmod along the following lines::
In your VCL you could then use this vmod along the following lines::
...
...
rename-vmod-script
View file @
16bbf23c
...
@@ -21,6 +21,7 @@ fi
...
@@ -21,6 +21,7 @@ fi
SYM_NAME
=
${
NAME
,,*
}
SYM_NAME
=
${
NAME
,,*
}
CAP_NAME
=
${
NAME
^?
}
CAP_NAME
=
${
NAME
^?
}
UPP_NAME
=
${
NAME
^^?
}
if
!
git diff-index
--quiet
HEAD
--
;
then
if
!
git diff-index
--quiet
HEAD
--
;
then
echo
"ERROR: Need a clean working tree. Run
\"
git stash
\"
first."
echo
"ERROR: Need a clean working tree. Run
\"
git stash
\"
first."
...
@@ -32,9 +33,13 @@ git mv src/vmod_example.vcc src/vmod_${SYM_NAME}.vcc
...
@@ -32,9 +33,13 @@ git mv src/vmod_example.vcc src/vmod_${SYM_NAME}.vcc
git
grep
-z
-l
example | xargs
-0
sed
-i
-s
-e
"s/example/
${
SYM_NAME
}
/g"
git
grep
-z
-l
example | xargs
-0
sed
-i
-s
-e
"s/example/
${
SYM_NAME
}
/g"
git
grep
-z
-l
Example | xargs
-0
sed
-i
-s
-e
"s/Example/
${
CAP_NAME
}
/g"
git
grep
-z
-l
Example | xargs
-0
sed
-i
-s
-e
"s/Example/
${
CAP_NAME
}
/g"
git
grep
-z
-l
EXAMPLE | xargs
-0
sed
-i
-s
-e
"s/EXAMPLE/
${
UPP_NAME
}
/g"
git
rm
-f
rename-vmod-script
git
rm
-f
rename-vmod-script
# restore foreign files
git checkout m4/
*
cat
<<
EOF
cat
<<
EOF
All done.
All done.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment