mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 05:29:30 +00:00
Use TRUE/FALSE for typeless option values in --help. Update parse_options.sh lib in Bash tools.
This commit is contained in:
@@ -124,6 +124,13 @@ usage_or_errors() {
|
||||
for opt in $(ls "$PO_DIR"); do
|
||||
local varname="OPT_$(echo "$opt" | tr a-z- A-Z_)"
|
||||
local varvalue="${!varname}"
|
||||
if ! grep -q "type:" "$PO_DIR/$opt" >/dev/null; then
|
||||
if [ "$varvalue" -a "$varvalue" = "yes" ];
|
||||
then varvalue="TRUE"
|
||||
else
|
||||
varvalue="FALSE"
|
||||
fi
|
||||
fi
|
||||
printf -- " --%-30s %s" "$opt" "${varvalue:-(No value)}"
|
||||
echo
|
||||
done
|
||||
|
Reference in New Issue
Block a user