[ITP] qt3-3.3.4

Peter Ekberg peda@lysator.liu.se
Thu Sep 29 12:12:00 GMT 2005

On Wed, Sep 28, 2005 at 10:38:31PM -0400, Igor Pechtchanski wrote:
> On Wed, 28 Sep 2005, Nicholas Wourms wrote:
> > unpack() {
> >   winbase=`cygpath -m ${srcdir}`
> Ahem,
> winbase="`cygpath -m "${srcdir}"`"


quote from the autoconf manual:


10.5 Shell Substitutions

Contrary to a persistent urban legend, the Bourne shell does not
systematically split variables and back-quoted expressions, in
particular on the right-hand side of assignments and in the argument of
`case'.  For instance, the following code:

     case "$given_srcdir" in
     .)  top_srcdir="`echo "$dots" | sed 's,/$,,'`"
     *)  top_srcdir="$dots$given_srcdir" ;;

is more readable when written as:

     case $given_srcdir in
     .)  top_srcdir=`echo "$dots" | sed 's,/$,,'`
     *)  top_srcdir=$dots$given_srcdir ;;

and in fact it is even _more_ portable: in the first case of the first
attempt, the computation of `top_srcdir' is not portable, since not all
shells properly understand `"`..."..."...`"'.  Worse yet, not all
shells understand `"`...\"...\"...`"' the same way.  There is just no
portable way to use double-quoted strings inside double-quoted
back-quoted expressions (pfew!).



More information about the Cygwin-apps mailing list