43 lines
838 B
Text
43 lines
838 B
Text
|
#!/bin/sh -
|
||
|
#
|
||
|
# $Id: chk.str 7 2007-02-03 13:34:17Z gburd $
|
||
|
#
|
||
|
# Check spelling in quoted strings.
|
||
|
|
||
|
d=../..
|
||
|
|
||
|
[ -f $d/LICENSE ] || {
|
||
|
echo 'FAIL: cannot find source distribution directory.'
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
t1=__1
|
||
|
|
||
|
sed -e '/^#include/d' \
|
||
|
-e '/"/!d' \
|
||
|
-e 's/^[^"]*//' \
|
||
|
-e 's/%s/ /g' \
|
||
|
-e 's/[^"]*$//' \
|
||
|
-e 's/\\[nt]/ /g' \
|
||
|
`find $d -name '*.[ch]' -o -name '*.cpp' -o -name '*.java' |
|
||
|
sed '/\/perl\//d'` |
|
||
|
spell | sort | comm -23 /dev/stdin spell.ok > $t1
|
||
|
|
||
|
test -s $t1 && {
|
||
|
cat $t1 | uniq
|
||
|
echo "FAIL: found questionable spelling in strings."
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
egrep -h '/\* | \* ' \
|
||
|
`find $d -name '*.[ch]' -o -name '*.cpp' | sed '/\/perl\//d'` |
|
||
|
spell | sort | comm -23 /dev/stdin spell.ok | tee /tmp/f/1 > $t1
|
||
|
|
||
|
test -s $t1 && {
|
||
|
cat $t1 | uniq
|
||
|
echo "FAIL: found questionable spelling in comments."
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
exit 0
|