Use LC_ALL=C to fix broken awk on some systems.

This commit is contained in:
Daniel Nichter
2011-12-07 11:58:33 -07:00
parent c486bf8461
commit 876e3533d0

View File

@@ -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