2016-08-17 09:39:40 +00:00
|
|
|
#! /bin/bash
|
2016-08-18 15:15:37 +00:00
|
|
|
cat <<---
|
|
|
|
This test checks that the built Nginx either has the dynamic fancyindex
|
|
|
|
module available, or that it's not there (for static builds).
|
|
|
|
--
|
|
|
|
|
2016-08-17 09:39:40 +00:00
|
|
|
readonly nginx_path="${PREFIX}/sbin/nginx"
|
|
|
|
readonly so_path="${PREFIX}/modules/ngx_http_fancyindex_module.so"
|
|
|
|
|
2016-08-17 19:35:03 +00:00
|
|
|
if [[ ! -x ${nginx_path} ]] ; then
|
|
|
|
fail "executable binary not found at '%s'\n" "${nginx_path}"
|
|
|
|
fi
|
2016-08-17 09:39:40 +00:00
|
|
|
|
|
|
|
if ${DYNAMIC} ; then
|
2016-08-17 19:35:03 +00:00
|
|
|
if [[ ! -r ${so_path} ]] ; then
|
|
|
|
fail "module not found at '%s'\n" "${so_path}"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [[ -r ${so_path} ]] ; then
|
|
|
|
fail "module should not exist at '%s'\n" "${so_path}"
|
|
|
|
fi
|
2016-08-17 09:39:40 +00:00
|
|
|
fi
|