File: build-and-run

package info (click to toggle)
nginx 1.18.0-6.1%2Bdeb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 19,344 kB
  • sloc: ansic: 250,653; perl: 7,548; sh: 1,408; ruby: 879; python: 358; makefile: 338; awk: 36; cpp: 18
file content (25 lines) | stat: -rwxr-xr-x 473 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /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}