Re: ${var:+quo ted} and similar, inside unquoted here-docs

2010-08-30 Thread Eric Blake
[adding bug-bash] On 08/29/2010 08:48 AM, Ralf Wildenhues wrote: With Solaris 10 sh (and others): catEOF ${var-quo ted} EOF quo ted Whereas with bash (and others): quo ted Ouch. New one to me. ksh, zsh, and dash do not echo the quotes, so I'm thinking it may be a bash bug; hence the

Re: ${var:+quo ted} and similar, inside unquoted here-docs

2010-08-30 Thread Eric Blake
On 08/29/2010 08:59 AM, Ralf Wildenhues wrote: -AS_BOX([Configuring AC_PACKAGE_TARNAME${TIMESTAMP:+ (Build:$TIMESTAMP)} AC_PACKAGE_VERSION]) +timestamp_string= +if test -n $TIMESTAMP; then + timestamp_string= (Build:$TIMESTAMP) +fi Why not: timestamp_string=${TIMESTAMP:+ (Build:$TIMESTAMP)}

Re: ${var:+quo ted} and similar, inside unquoted here-docs

2010-08-30 Thread Eric Blake
On 08/30/2010 08:57 AM, Eric Blake wrote: [adding bug-bash] On 08/29/2010 08:48 AM, Ralf Wildenhues wrote: With Solaris 10 sh (and others): catEOF ${var-quo ted} EOF quo ted Whereas with bash (and others): quo ted Ouch. New one to me. ksh, zsh, and dash do not echo the quotes, so I'm

Re: ${var:+quo ted} and similar, inside unquoted here-docs

2010-08-30 Thread Eric Blake
On 08/29/2010 08:59 AM, Ralf Wildenhues wrote: +++ b/configure.ac @@ -113,7 +113,11 @@ case $lt_alpha in TIMESTAMP= ;; esac -AS_BOX([Configuring AC_PACKAGE_TARNAME${TIMESTAMP:+ (Build:$TIMESTAMP)} AC_PACKAGE_VERSION]) According to 'git gui blame configure.ac', libtool has been

Re: ${var:+quo ted} and similar, inside unquoted here-docs

2010-08-30 Thread Ralf Wildenhues
Hi Eric, * Eric Blake wrote on Mon, Aug 30, 2010 at 05:09:05PM CEST: On 08/29/2010 08:59 AM, Ralf Wildenhues wrote: -AS_BOX([Configuring AC_PACKAGE_TARNAME${TIMESTAMP:+ (Build:$TIMESTAMP)} AC_PACKAGE_VERSION]) +timestamp_string= +if test -n $TIMESTAMP; then + timestamp_string=

Re: ${var:+quo ted} and similar, inside unquoted here-docs

2010-08-29 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Sun, Aug 29, 2010 at 04:48:34PM CEST: With Solaris 10 sh (and others): cat EOF ${var-quo ted} EOF quo ted I'm working around the issue in Libtool like this. Cheers, Ralf Work around yet another shell quoting portability issue. * configure.ac: