File: check-doc.sh

package info (click to toggle)
mmlib 1.4.2-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,716 kB
  • sloc: ansic: 18,071; makefile: 431; sh: 135; python: 63
file content (19 lines) | stat: -rwxr-xr-x 507 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

if [ "$(git rev-parse --show-toplevel)" != "$PWD" ]
then
	echo "go to top dir"
	echo "git clean -dfx && ./autogen.sh && ./configure && make"
	exit 1
fi

FILES=$(sed -e 's/.. kernel-doc::\(.*\)/\1/;t;d' doc/*.rst)
expected=$(cat $FILES | grep -c API_EXPORTED)
html_exported=$(cat doc/html/*.html | grep -c "class=\"function\"" )
man_pages=$(ls doc/man/*.3 | wc -l)

{
	echo "Expected $expected API functions"
	echo "Found $html_exported html functions"
	echo "Found $man_pages man pages"
} 1>&2