blob: d869800ca610ea7fdf4b67b3609da55a181528a0 [file] [log] [blame]
Dominik Riebeling58626122011-06-19 09:41:03 +00001#!/bin/sh
2# __________ __ ___.
3# Open \______ \ ____ ____ | | _\_ |__ _______ ___
4# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7# \/ \/ \/ \/ \/
8#
9# Spell check files from the Rockbox manual.
10#
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.
14
15MANDIR=$(dirname $0)
Dominik Riebeling35c1df92011-08-09 23:14:41 +000016PERSONALDICT=$MANDIR/spelldict.pws
Dominik Riebeling58626122011-06-19 09:41:03 +000017if [ $# -gt 0 ]; then
18 TEX_FILES="$1"
19else
Dominik Riebeling35c1df92011-08-09 23:14:41 +000020 TEX_FILES=$(find "$MANDIR" -name "*.tex" | sed -e "s/\S*preamble.tex//;/platform\//d;")
Dominik Riebeling58626122011-06-19 09:41:03 +000021fi
22
23for file in $TEX_FILES; do
24 aspell -t -l en_UK-ise --add-tex-command="opt pp" \
Dominik Riebeling35c1df92011-08-09 23:14:41 +000025 --add-tex-command="nopt pp" --add-tex-command="screenshot ppp" \
Dominik Riebeling58626122011-06-19 09:41:03 +000026 --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" \
Dominik Riebeling35c1df92011-08-09 23:14:41 +000029 --add-tex-command="download p" --add-tex-command="begin ppp" \
30 --add-tex-command="config p" \
31 --personal=$PERSONALDICT \
Dominik Riebeling58626122011-06-19 09:41:03 +000032 -c $file
33done