Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-devicedetect
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-devicedetect
Commits
ac449c67
Commit
ac449c67
authored
Mar 06, 2012
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrap it
parent
68a9161e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
insert-vcl-examples
insert-vcl-examples
+15
-13
No files found.
insert-vcl-examples
View file @
ac449c67
...
...
@@ -3,19 +3,21 @@
# To make sure the example VCL code is valid and runnable, actually store the auth copy in
# the varnishtest files. Use the magic of sed to put it into the documentation.
#
#tmpfile=/tmp/foo$RANDOM
tmpfile
=
/tmp/foo
tmpfile
=
/tmp/foo
$RANDOM
# stuff to put into the section
sed
-n
'/varnish v1 -vcl+backend/,/start/p'
tests/073-example3.vtc
>
$tmpfile
sed
-i
'/${projectdir}\/..\//d'
$tmpfile
# remove first and last line of file. todo: learn more sed to do this more smoothly.
tail
-n
+2
$tmpfile
|
head
-n-1
>
$tmpfile
.2
;
mv
$tmpfile
.2
$tmpfile
sed
-e
'/... example3-start/ q'
INSTALL.rst
>
$tmpfile
.orig.top
echo
-e
"VCL::
\n
"
>>
$tmpfile
.orig.top
sed
-n
'/... example3-end/,$p'
INSTALL.rst
>
$tmpfile
.orig.below
cat
$tmpfile
.orig.top
$tmpfile
$tmpfile
.orig.below
>
/tmp/fooNEW
echo
$tmpfile
transform
()
{
f
=
$1
# stuff to put into the section
sed
-n
'/varnish v1 -vcl+backend/,/start/p'
tests/
$f
.vtc
>
$tmpfile
sed
-i
's/${projectdir}\/..\///'
$tmpfile
# remove first and last line of file. todo: learn more sed to do this more smoothly.
tail
-n
+2
$tmpfile
|
head
-n-1
>
$tmpfile
.2
;
mv
$tmpfile
.2
$tmpfile
sed
-e
"/...
$f
-start/ q"
INSTALL.rst
>
$tmpfile
.orig.top
echo
-e
"VCL::
\n
"
>>
$tmpfile
.orig.top
sed
-n
"/...
$f
-end/,
\$
p"
INSTALL.rst
>
$tmpfile
.orig.below
cat
$tmpfile
.orig.top
$tmpfile
$tmpfile
.orig.below
>
INSTALL.rst
rm
$tmpfile
$tmpfile
.orig.top
$tmpfile
.orig.below
}
transform 073-example3
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