summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/dist/s_string
diff options
context:
space:
mode:
authorRamon Fernandez <ramon.fernandez@mongodb.com>2015-04-27 11:33:41 -0400
committerRamon Fernandez <ramon.fernandez@mongodb.com>2015-04-27 11:33:47 -0400
commit34b853ed0566a3bbffcd825191b9000de331bddc (patch)
tree06f3f81436489f252da15900b2fef169e7ca1bde /src/third_party/wiredtiger/dist/s_string
parent076cd926ab476f872afdd89a0e5e7e733d26c3ae (diff)
downloadmongo-34b853ed0566a3bbffcd825191b9000de331bddc.tar.gz
SERVER-18199 Import wiredtiger-wiredtiger-2.5.3-371-g1f44c05.tar.gz from wiredtiger branch mongodb-3.2
Diffstat (limited to 'src/third_party/wiredtiger/dist/s_string')
-rw-r--r--src/third_party/wiredtiger/dist/s_string31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/dist/s_string b/src/third_party/wiredtiger/dist/s_string
index 89ba5b130d0..2e226b21094 100644
--- a/src/third_party/wiredtiger/dist/s_string
+++ b/src/third_party/wiredtiger/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