mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 14:18:32 +00:00
Use LC_ALL=C to fix broken awk on some systems.
This commit is contained in:
@@ -82,6 +82,11 @@ parse_options() {
|
|||||||
# from the option's POD line like "type: string; default: foo".
|
# from the option's POD line like "type: string; default: foo".
|
||||||
mkdir $TMPDIR/po/ 2>/dev/null
|
mkdir $TMPDIR/po/ 2>/dev/null
|
||||||
rm -rf $TMPDIR/po/*
|
rm -rf $TMPDIR/po/*
|
||||||
|
(
|
||||||
|
# awk is stupid on some systems (e.g. Ubuntu 10) such that
|
||||||
|
# /^[a-z]/ incorrectly matches "Foo". This fixes that.
|
||||||
|
export LC_ALL="C"
|
||||||
|
|
||||||
awk -v "po_dir"="$TMPDIR/po" '
|
awk -v "po_dir"="$TMPDIR/po" '
|
||||||
/^=head1 OPTIONS/ {
|
/^=head1 OPTIONS/ {
|
||||||
getline
|
getline
|
||||||
@@ -109,6 +114,7 @@ parse_options() {
|
|||||||
}
|
}
|
||||||
exit
|
exit
|
||||||
}' $file
|
}' $file
|
||||||
|
)
|
||||||
|
|
||||||
# Evaluate the program options into existence as global variables
|
# Evaluate the program options into existence as global variables
|
||||||
# transformed like --my-op == $OPT_MY_OP. If an option has a default
|
# transformed like --my-op == $OPT_MY_OP. If an option has a default
|
||||||
|
Reference in New Issue
Block a user