* config/general.m4sh (func_quote_for_eval): Move backslash to

beginning of character class, to work around old Bash bug.
(func_quote_for_expand): Also test to avoid unnecessary fork.
This commit is contained in:
Ralf Wildenhues 2004-12-28 15:16:33 +00:00
parent 52ba41bdad
commit 8782d88386
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2004-12-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* config/general.m4sh (func_quote_for_eval): Move backslash to
beginning of character class, to work around old Bash bug.
(func_quote_for_expand): Also test to avoid unnecessary fork.
2004-12-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>,
Gary V. Vaughan <gary@gnu.org>

View File

@ -275,7 +275,7 @@ func_mktempdir ()
func_quote_for_eval ()
{
case $1 in
*[[\`\"\\\$]]*)
*[[\\\`\"\$]]*)
func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
*)
func_quote_for_eval_unquoted_result="$1" ;;
@ -303,8 +303,13 @@ func_quote_for_eval ()
# but do not quote variable references.
func_quote_for_expand ()
{
my_arg=`$ECHO "X$1" | $Xsed \
-e "$double_quote_subst" -e "$sed_double_backslash"`
case $1 in
*[[\\\`\"]]*)
my_arg=`$ECHO "X$1" | $Xsed \
-e "$double_quote_subst" -e "$sed_double_backslash"` ;;
*)
my_arg="$1" ;;
esac
case $my_arg in
# Double-quote args containing shell metacharacters to delay