diff options
| author | Michael Biebl <biebl@debian.org> | 2018-07-01 20:59:09 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-07-01 20:59:09 +0200 |
| commit | 6106f75cc14c2d8af6999bd28dd075c32411deaf (patch) | |
| tree | 2e084cc81011fc5cec703704f2ff5b65f5a7fa8d /tools/check-docs.sh | |
| parent | e8b3308b1970e9b71b443479351e173cb89e3800 (diff) | |
| parent | 429393567647935d9123e21fd27a7529d50255eb (diff) | |
Update upstream source from tag 'upstream/1.12.0'
Update to upstream version '1.12.0' with Debian dir 76506925b30952acfa95c8f5b789bcfb2a8e3a6e
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 00000000..9dcdb1ef --- /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 |