1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

CI: Improve Usage readability and add -h option.

This commit is contained in:
Jia Tan 2023-01-12 22:44:18 +08:00
parent a8bb8358d1
commit 77d1ebcc99

View file

@ -16,7 +16,14 @@
set -e set -e
USAGE="Usage: $0 -b [autotools|cmake] -c [crc32|crc64|sha256] -d [encoders|decoders|bcj|delta|threads] -l [destdir] -s [srcdir] -p [all|build|test] -f[-m32]" USAGE="Usage: $0
-b [autotools|cmake]
-c [crc32|crc64|sha256]
-d [encoders|decoders|bcj|delta|threads]
-l [destdir]
-s [srcdir]
-p [all|build|test]
-f [CFLAGS]"
# Absolute path of script directory # Absolute path of script directory
ABS_DIR=$(cd -- "$(dirname -- "$0")" && pwd) ABS_DIR=$(cd -- "$(dirname -- "$0")" && pwd)
@ -34,9 +41,13 @@ DEST_DIR="$SRC_DIR/../xz_build"
PHASE="all" PHASE="all"
# Parse arguments # Parse arguments
while getopts b:c:d:l:s:p:f: opt; do while getopts b:c:d:l: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)
echo "$USAGE"
exit 0
;;
b) b)
case "$OPTARG" in case "$OPTARG" in
autotools) ;; autotools) ;;