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_ENABLED=0
|
||||||
LISTENER_ARGS=()
|
LISTENER_ARGS=()
|
||||||
|
|
||||||
for arg in "$@"; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $arg in
|
case "$1" in
|
||||||
--no-enrich)
|
--no-enrich)
|
||||||
NO_ENRICH=1
|
NO_ENRICH=1
|
||||||
shift
|
shift
|
||||||
|
@ -20,7 +20,7 @@ for arg in "$@"; do
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--listener-channel=*)
|
--listener-channel=*)
|
||||||
LISTENER_ARGS+=("--channel" "${arg#*=}")
|
LISTENER_ARGS+=("--channel" "${1#*=}")
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--listener-hop)
|
--listener-hop)
|
||||||
|
@ -28,7 +28,7 @@ for arg in "$@"; do
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown argument: $arg"
|
echo "Unknown argument: $1"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue