summaryrefslogtreecommitdiffstats
path: root/doc/glossary/checkxrefs
blob: 6da64c184b3090bcea71ff310316a410e60a2b57 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
DEFINED_ENTRIES=`sed -ne "s^.*<glossentry id=\"\(.*\)\">.*^\1^p" *.docbook`
REFERENCED_ENTRIES=`sed -ne "s^.*<glossseealso otherterm=\"\(.*\)\">.*^\1^p" *.docbook | unique`

# Check for entries which are referenced but not defined.
for ENTRY in $REFERENCED_ENTRIES; do
	if ! echo $DEFINED_ENTRIES | grep $ENTRY - > /dev/null 2>&1; then
		echo "'$ENTRY' referenced but not defined!"
	fi
done