diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-26 12:02:33 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-28 20:43:26 +0200 |
commit | 4fa1a495428e65be01e3b3edeaae93e2495ec20a (patch) | |
tree | c52d85e52ebf946c1b359f5053cdd0a121a4c166 /tools/check-docs.sh | |
parent | 79fe82753dea6716ed5ea2929487fb5bc9116c45 (diff) | |
download | NetworkManager-4fa1a495428e65be01e3b3edeaae93e2495ec20a.tar.gz |
docs: include missing documentation in libnm and D-Bus docs
Check that we don't repeat the omission in future.
(cherry picked from commit cb1172ee3d929dddb3313fd4611160fa8cd5b3e6)
Diffstat (limited to 'tools/check-docs.sh')
-rwxr-xr-x | tools/check-docs.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/check-docs.sh b/tools/check-docs.sh new file mode 100755 index 0000000000..9dcdb1ef3b --- /dev/null +++ b/tools/check-docs.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +SOURCEDIR=$1 +[ -n "$SOURCEDIR" ] && SOURCEDIR="$SOURCEDIR/" + +# Check that the D-Bus API docs contain all known interfaces +if (sed -n 's/.*<xi:include href="dbus-\(.*\.xml\)".*/\1\n\1/p' $SOURCEDIR''docs/api/network-manager-docs.xml; + cd $SOURCEDIR''introspection; ls *.xml) |sort |uniq -u| grep . >&2; then + echo "*** Error: D-Bus interfaces not included in docs/api/network-manager-docs.xml ***" >&2 + exit 1 +fi + +# Check that files that define types that are in public libnm API are included in libnm documentation. +# Don't complain about readability or I'll rewrite this in Perl. +if (sed -n 's/.*<xi:include href="\(xml\/.*\.xml\)".*/\1\n\1/p' $SOURCEDIR''docs/libnm/libnm-docs.xml; + grep -lE "$(sed -n 's/^[\t ]*\(.*_get_type\);/\1/p' $SOURCEDIR''libnm/libnm.ver |xargs echo |sed 's/ /|/g')" $SOURCEDIR''libnm{,-core}/*.h | + sed 's,.*/,xml/,;s/\.h$/.xml/') |sort |uniq -u| grep . >&2; then + echo "*** Error: libnm classes not included in docs/libnm/libnm-docs.xml ***" >&2 + exit 1 +fi + +exit 0 |