summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-06-19 09:41:03 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-06-19 09:41:03 +0000
commit5862612205c33b587c59e94f0c11b1619dd044e6 (patch)
tree5167a7a86ea077081bd018d3d3c7fa0297a99293
parent6c8ef19dfd49a6410587f2dc9ab8e3731219629d (diff)
downloadrockbox-5862612205c33b587c59e94f0c11b1619dd044e6.tar.gz
rockbox-5862612205c33b587c59e94f0c11b1619dd044e6.zip
Add script to spellcheck the manual LaTeX sources.
This script wraps around aspell and calls it for the file passed on the command line or runs aspell on all TeX files found in the manual folder (except preamble.tex). aspell is called interactively. Note: there is currently no way to interrupt checking if running on the complete folder. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30013 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xmanual/spellcheck.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/manual/spellcheck.sh b/manual/spellcheck.sh
new file mode 100755
index 0000000000..4808192221
--- /dev/null
+++ b/manual/spellcheck.sh
@@ -0,0 +1,30 @@
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
15MANDIR=$(dirname $0)
16if [ $# -gt 0 ]; then
17 TEX_FILES="$1"
18else
19 TEX_FILES=$(find "$MANDIR" -name "*.tex" | sed -e "s/\S*preamble.tex//")
20fi
21
22for file in $TEX_FILES; do
23 aspell -t -l en_UK-ise --add-tex-command="opt pp" \
24 --add-tex-command="nopt pp" --add-tex-command="screenshot ppo" \
25 --add-tex-command="reference p" --add-tex-command="fname p" \
26 --add-tex-command="wikilink p" --add-tex-command="IfFileExists p" \
27 --add-tex-command="newcommand pp" --add-tex-command="renewcommand pp" \
28 --add-tex-command="download p" \
29 -c $file
30done