You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebase/doc/glossary/checkxrefs

11 lines
401 B

#!/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