Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
be073f05
Commit
be073f05
authored
Sep 18, 2019
by
Bernd Flemisch
Browse files
[bin][doc] add usage messages for README.md-generating scripts
parent
00dd15a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/doc/cpp_to_md.sh
View file @
be073f05
#!/bin/sh
# check if help is needed
if
test
"
$1
"
=
"--help"
||
test
"
$1
"
=
"-help"
\
||
test
"
$1
"
=
"help"
||
test
"
$1
"
=
""
;
then
echo
""
echo
"USAGE:
$0
FILENAME"
echo
""
echo
"The argument should be a C++ header or source file."
echo
"The file is converted to Markdown and forwarded to stdout."
echo
"In particular, a C++ comment is converted to its content,"
echo
"while normal code is put into corresponding Markdown code blocks."
echo
"Supposed to be called by the script merge_cpp_and_md.sh."
exit
0
fi
if
[[
${
1
:
-3
}
==
".hh"
]]
;
then
sed
'1,/#define/d'
$1
>
tmpfile
isheader
=
true
...
...
bin/doc/merge_cpp_and_md.sh
View file @
be073f05
#!/bin/sh
# The arguments should be names of Markdown and/or C++ files.
# The script loops through all arguments. If a Markdown file is encountered,
# its content is forwarded to stdout. For another file, a Markdown header
# stating the filename is printed and the script cpp_to_md.sh is applied.
# check if help is needed
if
test
"
$1
"
=
"--help"
||
test
"
$1
"
=
"-help"
\
||
test
"
$1
"
=
"help"
||
test
"
$1
"
=
""
;
then
echo
""
echo
"USAGE:
$0
FILENAME_1 [FILENAME_2 ...]"
echo
""
echo
"The arguments should be names of Markdown and/or C++ files."
echo
"The script loops through all arguments. If a Markdown file is encountered,"
echo
"its content is forwarded to stdout. For another file, a Markdown header"
echo
"stating the filename is printed and the script cpp_to_md.sh is applied."
echo
"To be used for creating README.mds in the example folder. For example, by"
echo
"bash
$0
intro.md spatialparams.hh problem.hh main.cc results.md >README.md"
exit
0
fi
for
filename
in
"
$@
"
do
...
...
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