Given an asciidoc input file in standard input, print the files included using asciidoc include macros to standard output, one per line. This will be helpful in asciidoc dependency generation.
Signed-off-by: Jani Nikula <jani.nik...@intel.com> --- scripts/asciidoc-includes | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 scripts/asciidoc-includes diff --git a/scripts/asciidoc-includes b/scripts/asciidoc-includes new file mode 100755 index 000000000000..d832035275eb --- /dev/null +++ b/scripts/asciidoc-includes @@ -0,0 +1,6 @@ +#!/bin/sh +# Given an asciidoc input file in standard input, print the files included using +# asciidoc include macros to standard output, one per line. + +INCLUDE="^include::\([^[]*\)\[.*\]" +exec sed "/${INCLUDE}/!d; s/${INCLUDE}/\1/" -- 2.1.4