summaryrefslogtreecommitdiffstats
path: root/doc/khelpcenter/glossary/checkxrefs
diff options
context:
space:
mode:
Diffstat (limited to 'doc/khelpcenter/glossary/checkxrefs')
-rwxr-xr-xdoc/khelpcenter/glossary/checkxrefs10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/khelpcenter/glossary/checkxrefs b/doc/khelpcenter/glossary/checkxrefs
new file mode 100755
index 000000000..6da64c184
--- /dev/null
+++ b/doc/khelpcenter/glossary/checkxrefs
@@ -0,0 +1,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