mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-05 20:07:54 +00:00
Handle --nofoo like --no-foo in parse_options.sh and update the Bash tools.
This commit is contained in:
@@ -351,12 +351,20 @@ _parse_command_line() {
|
||||
|
||||
real_opt="$opt"
|
||||
|
||||
if $(echo $opt | grep '^--no-' >/dev/null); then
|
||||
opt_is_negated=1
|
||||
opt=$(echo $opt | sed 's/^--no-//')
|
||||
if $(echo $opt | grep '^--no[^-]' >/dev/null); then
|
||||
local base_opt=$(echo $opt | sed 's/^--no//')
|
||||
if [ -f "$PT_TMPDIR/po/$base_opt" ]; then
|
||||
opt_is_negated=1
|
||||
opt="$base_opt"
|
||||
fi
|
||||
else
|
||||
opt_is_negated=""
|
||||
opt=$(echo $opt | sed 's/^-*//')
|
||||
if $(echo $opt | grep '^--no-' >/dev/null); then
|
||||
opt_is_negated=1
|
||||
opt=$(echo $opt | sed 's/^--no-//')
|
||||
else
|
||||
opt_is_negated=""
|
||||
opt=$(echo $opt | sed 's/^-*//')
|
||||
fi
|
||||
fi
|
||||
|
||||
if $(echo $opt | grep '^[a-z-][a-z-]*=' >/dev/null 2>&1); then
|
||||
|
Reference in New Issue
Block a user