Refactor argument parsing in runtest.sh to improve clarity and consistency
This commit is contained in:
parent
099ea01a52
commit
e448097581
1 changed files with 4 additions and 4 deletions
|
@ -8,8 +8,8 @@ NO_ENRICH=0
|
|||
LISTENER_ENABLED=0
|
||||
LISTENER_ARGS=()
|
||||
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--no-enrich)
|
||||
NO_ENRICH=1
|
||||
shift
|
||||
|
@ -20,7 +20,7 @@ for arg in "$@"; do
|
|||
shift
|
||||
;;
|
||||
--listener-channel=*)
|
||||
LISTENER_ARGS+=("--channel" "${arg#*=}")
|
||||
LISTENER_ARGS+=("--channel" "${1#*=}")
|
||||
shift
|
||||
;;
|
||||
--listener-hop)
|
||||
|
@ -28,7 +28,7 @@ for arg in "$@"; do
|
|||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown argument: $arg"
|
||||
echo "Unknown argument: $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue