FS#12828 : french update
[maemo-rb.git] / manual / spellcheck.sh
blobd869800ca610ea7fdf4b67b3609da55a181528a0
1 #!/bin/sh
2 # __________ __ ___.
3 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 # \/ \/ \/ \/ \/
9 # Spell check files from the Rockbox manual.
11 # Call the script with a single file to spellcheck. Call it without arguments
12 # to spellcheck all files in the manual tree except preamble.tex.
13 # This will invoke aspell interactively.
15 MANDIR=$(dirname $0)
16 PERSONALDICT=$MANDIR/spelldict.pws
17 if [ $# -gt 0 ]; then
18 TEX_FILES="$1"
19 else
20 TEX_FILES=$(find "$MANDIR" -name "*.tex" | sed -e "s/\S*preamble.tex//;/platform\//d;")
23 for file in $TEX_FILES; do
24 aspell -t -l en_UK-ise --add-tex-command="opt pp" \
25 --add-tex-command="nopt pp" --add-tex-command="screenshot ppp" \
26 --add-tex-command="reference p" --add-tex-command="fname p" \
27 --add-tex-command="wikilink p" --add-tex-command="IfFileExists p" \
28 --add-tex-command="newcommand pp" --add-tex-command="renewcommand pp" \
29 --add-tex-command="download p" --add-tex-command="begin ppp" \
30 --add-tex-command="config p" \
31 --personal=$PERSONALDICT \
32 -c $file
33 done