Dominik Riebeling | 5862612 | 2011-06-19 09:41:03 +0000 | [diff] [blame] | 1 | #!/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 | |
| 15 | MANDIR=$(dirname $0) |
Dominik Riebeling | 35c1df9 | 2011-08-09 23:14:41 +0000 | [diff] [blame] | 16 | PERSONALDICT=$MANDIR/spelldict.pws |
Dominik Riebeling | 5862612 | 2011-06-19 09:41:03 +0000 | [diff] [blame] | 17 | if [ $# -gt 0 ]; then |
| 18 | TEX_FILES="$1" |
| 19 | else |
Dominik Riebeling | 35c1df9 | 2011-08-09 23:14:41 +0000 | [diff] [blame] | 20 | TEX_FILES=$(find "$MANDIR" -name "*.tex" | sed -e "s/\S*preamble.tex//;/platform\//d;") |
Dominik Riebeling | 5862612 | 2011-06-19 09:41:03 +0000 | [diff] [blame] | 21 | fi |
| 22 | |
| 23 | for file in $TEX_FILES; do |
| 24 | aspell -t -l en_UK-ise --add-tex-command="opt pp" \ |
Dominik Riebeling | 35c1df9 | 2011-08-09 23:14:41 +0000 | [diff] [blame] | 25 | --add-tex-command="nopt pp" --add-tex-command="screenshot ppp" \ |
Dominik Riebeling | 5862612 | 2011-06-19 09:41:03 +0000 | [diff] [blame] | 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" \ |
Dominik Riebeling | 35c1df9 | 2011-08-09 23:14:41 +0000 | [diff] [blame] | 29 | --add-tex-command="download p" --add-tex-command="begin ppp" \ |
| 30 | --add-tex-command="config p" \ |
| 31 | --personal=$PERSONALDICT \ |
Dominik Riebeling | 5862612 | 2011-06-19 09:41:03 +0000 | [diff] [blame] | 32 | -c $file |
| 33 | done |