CI: Add argument to ci_build.sh to pass flags to autogen.sh.

This commit is contained in:
Jia Tan 2023-07-21 22:11:01 +08:00
parent 39a32d36fc
commit 556536a352
1 changed files with 7 additions and 2 deletions

View File

@ -17,6 +17,7 @@
set -e set -e
USAGE="Usage: $0 USAGE="Usage: $0
-a [autogen flags]
-b [autotools|cmake] -b [autotools|cmake]
-c [crc32|crc64|sha256] -c [crc32|crc64|sha256]
-d [encoders|decoders|bcj|delta|threads|shared|nls|small|ifunc|clmul] -d [encoders|decoders|bcj|delta|threads|shared|nls|small|ifunc|clmul]
@ -30,6 +31,7 @@ USAGE="Usage: $0
ABS_DIR=$(cd -- "$(dirname -- "$0")" && pwd) ABS_DIR=$(cd -- "$(dirname -- "$0")" && pwd)
# Default CLI option values # Default CLI option values
AUTOGEN_FLAGS=""
BUILD_SYSTEM="autotools" BUILD_SYSTEM="autotools"
CHECK_TYPE="crc32,crc64,sha256" CHECK_TYPE="crc32,crc64,sha256"
BCJ="y" BCJ="y"
@ -52,13 +54,16 @@ ARTIFACTS_DIR_NAME="output"
# Parse arguments # # Parse arguments #
################### ###################
while getopts b:c:d:l:n:s:p:f:h opt; do while getopts a:b:c:d:l:n:s:p:f:h opt; do
# b option can have either value "autotools" OR "cmake" # b option can have either value "autotools" OR "cmake"
case ${opt} in case ${opt} in
h) h)
echo "$USAGE" echo "$USAGE"
exit 0 exit 0
;; ;;
a)
AUTOGEN_FLAGS="$OPTARG"
;;
b) b)
case "$OPTARG" in case "$OPTARG" in
autotools) ;; autotools) ;;
@ -187,7 +192,7 @@ then
# Run autogen.sh script if not already run # Run autogen.sh script if not already run
if [ ! -f configure ] if [ ! -f configure ]
then then
"./autogen.sh" ./autogen.sh "$AUTOGEN_FLAGS"
fi fi
cd "$DEST_DIR" cd "$DEST_DIR"