2013-07-01 09:50:07 +02:00
|
|
|
!#/usr/bin/env bash
|
2012-08-15 20:45:08 +02:00
|
|
|
|
2013-07-01 09:50:07 +02:00
|
|
|
en="en_GB-ise-w_accents"
|
2012-08-15 20:45:08 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2013-11-09 05:43:51 +01:00
|
|
|
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
|
2012-12-05 04:00:23 +01:00
|
|
|
aspell --lang="${langarg}" check "../manuals/manpage${lang}.0"
|
2013-11-09 05:43:51 +01:00
|
|
|
git add "../manuals/manpage${lang}.6"
|
2012-08-15 20:45:08 +02:00
|
|
|
else
|
2013-11-09 05:43:51 +01:00
|
|
|
echo "spell.sh: unable to find document: manpage${lang}.6" >&2
|
2012-08-15 20:45:08 +02:00
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
"$@"
|