scripts: Fix options iteration in open-coredump.sh
When run like 'open-coredump.sh --help' the options parsing loop doesn't run because $# == 1 and [ $# -gt 1 ] evaluates to false. The simplest fix is to parse -h|--help on its own as the options parsing loop assumes that there's core-file argument present. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com> Closes #14075
This commit is contained in:
committed by
Botond Dénes
parent
e655060429
commit
577cd96da8
@@ -131,13 +131,14 @@ SCYLLA_REPO_PATH="${SCYLLA_REPO_PATH}"
|
||||
SCYLLA_GDB_PY_SOURCE="${SCYLLA_GDB_PY_SOURCE:-repo}"
|
||||
ARTIFACT_DIR=${ARTIFACT_DIR:-${SCRIPT_NAME}.dir}
|
||||
|
||||
if [[ $# -ge 1 && ( "$1" == "--help" || "$1" == "-h" ) ]]; then
|
||||
print_usage
|
||||
exit 0
|
||||
fi
|
||||
|
||||
while [[ $# -gt 1 ]]
|
||||
do
|
||||
case $1 in
|
||||
"--help"|"-h")
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
"--verbose"|"-v")
|
||||
VERBOSE_LEVEL=2
|
||||
shift 1
|
||||
|
||||
Reference in New Issue
Block a user