aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-08-15 20:45:08 +0200
committerMattias Andrée <maandree@operamail.com>2012-08-15 20:45:08 +0200
commit0ec99bab37dbc01b9484719114cc0eaa6738810e (patch)
tree8d09eb4d60a0f47bfc03f81e56b62768376d952f /dev
parent1b3deb8a5b7713d5c72a36521078ad9c711d34b6 (diff)
downloadponysay-0ec99bab37dbc01b9484719114cc0eaa6738810e.tar.gz
ponysay-0ec99bab37dbc01b9484719114cc0eaa6738810e.tar.bz2
ponysay-0ec99bab37dbc01b9484719114cc0eaa6738810e.zip
dev/spell.sh can be used to run spell checker on the manuals, using aspell, `dev/spell.sh man` checks manpage.6, `dev/spell.sh man es` checks manpage.es.6 and `dev/spell.sh` checks ponysay.texinfo + typo corrections in English manuals + gitignore update
Diffstat (limited to 'dev')
-rwxr-xr-xdev/spell.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/dev/spell.sh b/dev/spell.sh
new file mode 100755
index 0000000..9fe617e
--- /dev/null
+++ b/dev/spell.sh
@@ -0,0 +1,42 @@
+en="en_GB-ise-w_accents"
+
+
+info()
+{
+ if [ -f "./manuals/ponysay.texinfo" ]; then
+ aspell --lang="$en" check "./manuals/ponysay.texinfo"
+ git add "./manuals/ponysay.texinfo"
+ elif [ -f "../manuals/ponysay.texinfo" ]; then
+ aspell --lang="$en" check "../manuals/ponysay.texinfo"
+ git add "../manuals/ponysay.texinfo"
+ else
+ echo "spell.sh: unable to find document: ponysay.texinfo" >&2
+ exit -1
+ fi
+}
+
+
+man()
+{
+ lang="$1"
+ langarg="$1"
+ if [ ! "$lang" = "" ]; then
+ lang=".$lang"
+ else
+ langarg="$en"
+ fi
+
+ if [ -f "./manuals/manpage${lang}.6" ]; then
+ aspell --lang="${langarg}" check "./manuals/manpage${lang}.6"
+ git add "./manuals/manpage${lang}.6"
+ elif [ -f "../manuals/manpage${lang}.6" ]; then
+ aspell --lang="${langarg}" check "../manuals/manpage${lang}.6"
+ git add "../manuals/manpage${lang}.6"
+ else
+ echo "spell.sh: unable to find document: manpage${lang}.6" >&2
+ exit -1
+ fi
+}
+
+
+"$@"