Skip to content

Commit cb2aabb

Browse files
author
jiahao
committed
dev: util/build.sh: fixed command line argument validation and environment variable usage.
1 parent 9bcbd69 commit cb2aabb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

util/build.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ version=$1
1010
force=$2
1111
home=~
1212

13+
if [ -z "$version" ]; then
14+
echo "Usage: $0 <nginx-version> [force]"
15+
exit 1
16+
fi
17+
1318
add_http3_module=--with-http_v3_module
14-
answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1`
19+
answer=`$root/util/ver-ge "$version" 1.25.1`
1520
if [ "$OPENSSL_VER" = "1.1.0l" ] || [ "$answer" = "N" ]; then
1621
add_http3_module=""
1722
fi
1823

1924
disable_pcre2=--without-pcre2
20-
answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1`
25+
answer=`$root/util/ver-ge "$version" 1.25.1`
2126
if [ "$answer" = "N" ] || [ "$USE_PCRE2" = "Y" ]; then
2227
disable_pcre2=""
2328
fi

0 commit comments

Comments
 (0)