| #!/bin/bash |
| |
| # Copyright 2024 The Khronos Group Inc. |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| # find_adoc_deps - find include:: dependencies of an asciidoc file |
| # Usage: find_adoc_deps file GENERATED |
| # Prints a space-separated list of file dependencies determined from the |
| # include:: constructs in 'file'. |
| # The literal text '{generated}' in an include:: path is substituted |
| # with the value of the second argument. |
| |
| if test -f $1 ; then |
| echo `grep '^include::' $1 | sed -e 's/^include:://' -e 's/\[\]/ /' -e "s#{generated}#$2#"` |
| else |
| exit 1 |
| fi |