mirror of
https://github.com/simon987/ngx_http_js_challenge_module.git
synced 2025-04-10 05:56:44 +00:00
19 lines
412 B
Bash
Executable File
19 lines
412 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -z ${NGINX_PATH+x} ]; then
|
|
echo "Please set the NGINX_PATH variable";
|
|
exit
|
|
fi
|
|
|
|
MODULE_PATH=$(pwd)/
|
|
CONFIG_ARGS=$(nginx -V 2>&1 | tail -n 1 | cut -c 21- | sed 's/--add-dynamic-module=.*//g')
|
|
CONFIG_ARGS="${CONFIG_ARGS} --add-dynamic-module=${MODULE_PATH}"
|
|
echo $CONFIG_ARGS
|
|
|
|
(
|
|
cd ${NGINX_PATH} || exit
|
|
bash -c "./configure ${CONFIG_ARGS}"
|
|
CFLAGS=-std=c99 make modules -j "$(nproc)"
|
|
)
|
|
|