2008-05-02 22:19:38 +08:00
|
|
|
#/bin/sh
|
|
|
|
#
|
|
|
|
#This script checks to make sure all the commands we need are
|
|
|
|
#present
|
|
|
|
|
|
|
|
return_error()
|
|
|
|
{
|
|
|
|
echo "Error, can't run the $1 command"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
echo Testing environment for needed utilities
|
|
|
|
|
2008-10-02 08:45:17 +08:00
|
|
|
bc -h > /dev/null || return_error "bc";
|
2008-05-02 22:19:38 +08:00
|
|
|
echo nothing | awk '{}' > /dev/null || return_error "awk";
|
|
|
|
echo | sed -e "s/s/r/" > /dev/null || return_error "sed";
|
|
|
|
htmlify > /dev/null || return_error "htmlify";
|
|
|
|
echo | xargs > /dev/null || return_error "xargs";
|
2019-03-04 00:10:07 +08:00
|
|
|
git --version > /dev/null || return_error "git";
|
2008-05-02 22:19:38 +08:00
|
|
|
xsltproc -V > /dev/null || return_error "xsltproc";
|
|
|
|
tar --help > /dev/null || return_error "tar";
|
|
|
|
zip -h > /dev/null || return_error "zip";
|
|
|
|
bzip2 -h &> /dev/null || return_error "bzip2";
|
2013-05-27 06:46:38 +08:00
|
|
|
pygmentize -h &> /dev/null || return_error "pygmentize";
|
2013-07-06 02:56:51 +08:00
|
|
|
which sphinx-build &> /dev/null || return_error "sphinx-build";
|
2008-05-02 22:19:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
echo All needed utilities found
|
|
|
|
exit 0
|
|
|
|
|