[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ${var:+"quo ted"} and similar, inside unquoted here-docs
From: |
Eric Blake |
Subject: |
Re: ${var:+"quo ted"} and similar, inside unquoted here-docs |
Date: |
Mon, 30 Aug 2010 09:09:05 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2 |
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)}"
instead of the if/fi?
+AS_BOX([Configuring AC_PACKAGE_TARNAME$timestamp_string AC_PACKAGE_VERSION])
Or, since we know the workaround is to remove the "" inside here-docs,
why not:
AS_BOX([Configuring AC_PACKAGE_TARNAME${TIMESTAMP:+ (Build:$TIMESTAMP)}
AC_PACKAGE_VERSION])
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org