You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
473 B
26 lines
473 B
#! /bin/bash
|
|
set -e
|
|
|
|
if [[ $# -lt 1 || $# -gt 2 ]] ; then
|
|
echo "Usage: $0 <nginx-version> [1]" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
readonly NGINX=$1
|
|
|
|
if [[ $2 -eq 1 ]] ; then
|
|
readonly DYNAMIC=$2
|
|
fi
|
|
|
|
cd "$(dirname "$0")/.."
|
|
wget -O - http://nginx.org/download/nginx-${NGINX}.tar.gz | tar -xzf -
|
|
rm -rf prefix/
|
|
cd nginx-${NGINX}
|
|
./configure \
|
|
--add-${DYNAMIC:+dynamic-}module=.. \
|
|
--with-http_addition_module \
|
|
--prefix="$(pwd)/../prefix"
|
|
make install
|
|
cd ..
|
|
exec ./t/run prefix ${DYNAMIC}
|