ponysay/dev/spell.sh
Pablo Lezaeta 5239a3c9f5 Fix permision for executables... I think we need aome tool for those cases like this
Signed-off-by: Pablo Lezaeta <prflr88@gmail.com>
2014-06-10 01:52:12 -04:00

43 lines
972 B
Bash
Executable file

!#/usr/bin/env bash
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}.0"
git add "../manuals/manpage${lang}.6"
else
echo "spell.sh: unable to find document: manpage${lang}.6" >&2
exit -1
fi
}
"$@"