From d923dc18a7d584116842b87ff004f098e534206c Mon Sep 17 00:00:00 2001 From: jiahao Date: Fri, 5 Jul 2024 17:31:50 +0800 Subject: [PATCH] dev: util/build.sh: fixed command line argument validation and environment variable usage. --- util/build.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util/build.sh b/util/build.sh index eedbb9b5..6bb55caf 100755 --- a/util/build.sh +++ b/util/build.sh @@ -10,14 +10,19 @@ version=$1 force=$2 home=~ +if [ -z "$version" ]; then + echo "Usage: $0 [force]" + exit 1 +fi + add_http3_module=--with-http_v3_module -answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1` +answer=`$root/util/ver-ge "$version" 1.25.1` if [ "$OPENSSL_VER" = "1.1.0l" ] || [ "$answer" = "N" ]; then add_http3_module="" fi disable_pcre2=--without-pcre2 -answer=`$root/util/ver-ge "$NGINX_VERSION" 1.25.1` +answer=`$root/util/ver-ge "$version" 1.25.1` if [ "$answer" = "N" ] || [ "$USE_PCRE2" = "Y" ]; then disable_pcre2="" fi