mirror of https://github.com/tLDP/LDP
*** empty log message ***
This commit is contained in:
parent
70ec19d462
commit
dd18c6a870
|
@ -161,27 +161,41 @@ check_dist_suse()
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# check_html_parser
|
|
||||||
#
|
#
|
||||||
check_html_parser()
|
#
|
||||||
|
check_perl_module()
|
||||||
{
|
{
|
||||||
echo -n "Checking perl module HTML::Parser ... "
|
local module=$1
|
||||||
|
local error=$2
|
||||||
|
|
||||||
|
echo -n "Checking perl module ${module} ... "
|
||||||
perl <<EOF 2> /dev/null
|
perl <<EOF 2> /dev/null
|
||||||
use HTML::Parser;
|
use ${module};
|
||||||
use HTML::Entities;
|
use HTML::Entities;
|
||||||
print "Ok.\n";
|
print "Ok.\n";
|
||||||
exit 0
|
exit 0
|
||||||
EOF
|
EOF
|
||||||
[ $? == 0 ] && return 0
|
[ $? == 0 ] && return 0
|
||||||
echo "No."
|
echo "No."
|
||||||
|
echo "ERROR: Missing perl module ${module}."
|
||||||
|
[ -z "${error}" ] && echo "ERROR: ${error}"
|
||||||
|
CHECK_ERROR=$( expr ${CHECK_ERROR} + 1 )
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# check_html_parser
|
||||||
|
#
|
||||||
|
check_html_parser()
|
||||||
|
{
|
||||||
|
check_perl_module "HTML::Entities" && return 0
|
||||||
echo "ERROR: HTML-Parser is not installed (required for wt2db)."
|
echo "ERROR: HTML-Parser is not installed (required for wt2db)."
|
||||||
case ${DIST_NAME} in
|
case ${DIST_NAME} in
|
||||||
debian) pkg=libhtml-parser-perl ;;
|
debian) pkg=libhtml-parser-perl ;;
|
||||||
redhat) pkg=perl-HTML-Parser ;;
|
redhat) pkg=perl-HTML-Parser ;;
|
||||||
suse) pkg=perl-HTML-Parser ;;
|
suse) pkg=perl-HTML-Parser ;;
|
||||||
esac
|
esac
|
||||||
[ -n "${pkg}" ] && echo "The package is called '${pkg}'."
|
[ -n "${pkg}" ] && error="The package is called '${pkg}'."
|
||||||
CHECK_ERROR=$( expr ${CHECK_ERROR} + 1 )
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,11 +256,13 @@ check_python()
|
||||||
#
|
#
|
||||||
check_python_import()
|
check_python_import()
|
||||||
{
|
{
|
||||||
|
PYTHON=python
|
||||||
for module in "$@"; do
|
for module in "$@"; do
|
||||||
echo -n "Checking python module ${module} ... "
|
echo -n "Checking python module ${module} ... "
|
||||||
${PYTHON} -c "import ${module}" 2> /dev/null
|
${PYTHON} -c "import ${module}" 2> /dev/null
|
||||||
[ $? == 0 ] && echo "Ok." && continue
|
[ $? == 0 ] && echo "Ok." && continue
|
||||||
echo "No."
|
echo "No."
|
||||||
|
echo "ERROR: Missing python module ${module}."
|
||||||
CHECK_ERROR=$( expr ${CHECK_ERROR} + 1 )
|
CHECK_ERROR=$( expr ${CHECK_ERROR} + 1 )
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -301,8 +317,9 @@ echo "Identified this installation as '${DIST_NAME}'."
|
||||||
cat ${DIST_FILE}
|
cat ${DIST_FILE}
|
||||||
check_dist_${DIST_NAME} "count"
|
check_dist_${DIST_NAME} "count"
|
||||||
|
|
||||||
check_which count make
|
for app in iconv m4 make perl psql sed tar; do
|
||||||
check_which count perl
|
check_which count ${app}
|
||||||
|
done
|
||||||
check_xsltproc
|
check_xsltproc
|
||||||
check_html_parser
|
check_html_parser
|
||||||
check_which count wt2db
|
check_which count wt2db
|
||||||
|
|
Loading…
Reference in New Issue