3 # Do a spell check of PAE files using a standard dictionary
4 # and the aspell program
7 DICTFILE=pae-dict.aspell
10 [ -r "$DICTFILE" ] && return 0
11 [ -e "$DICTFILE" ] && echo "ERROR: Dictionary file $DICTFILE does not exist. Incomplete checkout?" >&2
12 [ ! -f "$DICTFILE" ] && echo "ERROR: Dictionary file $DICTFILE is not a regular file." >&2
17 echo "Usage: $0 book.xml [book2.xml ...]"
25 if ! check_dict ; then
26 echo "There was an error with the dictionary file. Aborting" >&2
31 if [ -f "$file" ] && [ -r "$file" ] ; then
32 echo "Running spell check for $file"
33 aspell --add-filter=sgml -p $DICTFILE -c $file
35 echo -n "ERROR: Will not check '$file'" >&2
36 if [ ! -e "$file" ] ; then
37 echo -n " it does not exist." >&2
38 elif [ ! -f "$file" ] ; then
39 echo " it is not a regular file." >&2