summaryrefslogtreecommitdiff
path: root/dist/s_string
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-03-28 14:24:28 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-03-28 14:24:28 -0400
commit7a667dc9fd8cbd1116f30b3065c25f37f0d82a1e (patch)
treef7bfb3db9a5a17d77a9e5f2e7b8841b070591a69 /dist/s_string
parent5b8f84ed137e8d9d6cdcb8addbf4e2865f0e9007 (diff)
downloadmongo-7a667dc9fd8cbd1116f30b3065c25f37f0d82a1e.tar.gz
Spelling cleanup.
Diffstat (limited to 'dist/s_string')
-rw-r--r--dist/s_string31
1 files changed, 30 insertions, 1 deletions
diff --git a/dist/s_string b/dist/s_string
index 89ba5b130d0..2e226b21094 100644
--- a/dist/s_string
+++ b/dist/s_string
@@ -15,6 +15,16 @@ type aspell > /dev/null 2>&1 || {
exit 0
}
+# replace:
+# Create a replacement list of spelling words.
+replace() {
+ aspell --mode=ccpp --lang=en list < ../$1 |
+ sort -u |
+ comm -12 /dev/stdin s_string.ok
+}
+
+# check:
+# Check the spelling of an individual file.
check() {
aspell --mode=ccpp --lang=en list < ../$1 |
sort -u |
@@ -27,9 +37,28 @@ check() {
# List of files to spellchk.
l=`(cd .. &&
- find examples ext src test -name '*.[chisy]' &&
+ find bench examples ext src test -name '*.[chisy]' &&
find src -name '*.in')`
+usage()
+{
+ echo 'usage: s_string [-r]' >&2
+ exit 1
+}
+while :
+ do case "$1" in
+ -r) # -r builds replacement list of OK words
+ for f in $l; do
+ replace $f
+ done | sort -u > $t
+ cp $t s_string.ok
+ shift;;
+ *)
+ test "$#" -eq 0 || usage
+ break;;
+ esac
+done
+
for f in $l; do
check $f
done