Skip to content
Snippets Groups Projects
Commit 00dd15a9 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[doc] add a script that appends Markdown and C++ files

parent efe54bfd
No related branches found
No related tags found
1 merge request!1683Automatically create READMEs for examples
#!/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.
for filename in "$@"
do
if [[ ${filename: -3} == ".md" ]]; then
cat $filename
else
echo ""
echo ""
echo "## The file \`$filename\`"
echo ""
bash cpp_to_md.sh $filename
echo ""
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment