mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
ci: Update the ci_verify_*.sh scripts.
Bring the coding patterns in line with the newest scripts.
This commit is contained in:
parent
c6ee62af2e
commit
7a6148290f
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
#
|
||||
@ -181,8 +181,9 @@ function ci_build {
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "usage: $CI_SCRIPT_NAME"
|
||||
exit 0
|
||||
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
||||
echo "options: -?|-h|--help"
|
||||
exit "${@:-0}"
|
||||
}
|
||||
|
||||
function main {
|
||||
@ -190,7 +191,7 @@ function main {
|
||||
while getopts ":" opt
|
||||
do
|
||||
# This ain't a while-loop. It only pretends to be.
|
||||
[[ $1 == -[?h]* || $1 == --help ]] && usage
|
||||
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||
ci_err "unknown option: '$1'"
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
@ -198,8 +199,9 @@ function main {
|
||||
ci_init_build
|
||||
ci_trace_build
|
||||
[[ $# -eq 0 ]] || {
|
||||
ci_info "note: this program accepts environment options only"
|
||||
ci_err "unexpected argument: '$1'"
|
||||
echo >&2 "error: unexpected argument: '$1'"
|
||||
echo >&2 "note: this program accepts environment options only"
|
||||
usage 2
|
||||
}
|
||||
ci_cleanup_old_build
|
||||
ci_build
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
#
|
||||
@ -134,8 +134,9 @@ function ci_build {
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "usage: $CI_SCRIPT_NAME"
|
||||
exit 0
|
||||
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
||||
echo "options: -?|-h|--help"
|
||||
exit "${@:-0}"
|
||||
}
|
||||
|
||||
function main {
|
||||
@ -143,7 +144,7 @@ function main {
|
||||
while getopts ":" opt
|
||||
do
|
||||
# This ain't a while-loop. It only pretends to be.
|
||||
[[ $1 == -[?h]* || $1 == --help ]] && usage
|
||||
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||
ci_err "unknown option: '$1'"
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
@ -151,8 +152,9 @@ function main {
|
||||
ci_init_build
|
||||
ci_trace_build
|
||||
[[ $# -eq 0 ]] || {
|
||||
ci_info "note: this program accepts environment options only"
|
||||
ci_err "unexpected argument: '$1'"
|
||||
echo >&2 "error: unexpected argument: '$1'"
|
||||
echo >&2 "note: this program accepts environment options only"
|
||||
usage 2
|
||||
}
|
||||
ci_cleanup_old_build
|
||||
ci_build
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -o errexit -o pipefail -o posix
|
||||
|
||||
# Copyright (c) 2019-2024 Cosmin Truta.
|
||||
#
|
||||
@ -141,8 +141,9 @@ function ci_build {
|
||||
}
|
||||
|
||||
function usage {
|
||||
echo "usage: $CI_SCRIPT_NAME"
|
||||
exit 0
|
||||
echo "usage: $CI_SCRIPT_NAME [<options>]"
|
||||
echo "options: -?|-h|--help"
|
||||
exit "${@:-0}"
|
||||
}
|
||||
|
||||
function main {
|
||||
@ -150,7 +151,7 @@ function main {
|
||||
while getopts ":" opt
|
||||
do
|
||||
# This ain't a while-loop. It only pretends to be.
|
||||
[[ $1 == -[?h]* || $1 == --help ]] && usage
|
||||
[[ $1 == -[?h]* || $1 == --help || $1 == --help=* ]] && usage 0
|
||||
ci_err "unknown option: '$1'"
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
@ -158,8 +159,9 @@ function main {
|
||||
ci_init_build
|
||||
ci_trace_build
|
||||
[[ $# -eq 0 ]] || {
|
||||
ci_info "note: this program accepts environment options only"
|
||||
ci_err "unexpected argument: '$1'"
|
||||
echo >&2 "error: unexpected argument: '$1'"
|
||||
echo >&2 "note: this program accepts environment options only"
|
||||
usage 2
|
||||
}
|
||||
ci_cleanup_old_build
|
||||
ci_build
|
||||
|
Loading…
x
Reference in New Issue
Block a user