On 18/01/2009, Rick Altherr <kc8...@kc8apf.net> wrote:
>
>
>  Begin forwarded message:
>
> > Author: ntfreak
> > Date: 2009-01-16 14:28:32 +0100 (Fri, 16 Jan 2009)
> > New Revision: 1333
> >
> > Modified:
> >  trunk/guess-rev.sh
> > Log:
> > - make guess-rev.sh work with msys
> >
> > Modified: trunk/guess-rev.sh
> >
> ===================================================================
> > --- trunk/guess-rev.sh  2009-01-16 12:48:00 UTC (rev 1332)
> > +++ trunk/guess-rev.sh  2009-01-16 13:28:32 UTC (rev 1333)
> > @@ -1,4 +1,5 @@
> > -#!/bin/bash
> > +#!/bin/sh
> > +#
> >
> > REV=unknown
> >
> >
> > _______________________________________________
> > Openocd-svn mailing list
> > openocd-...@lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/openocd-svn
> >
>
>
>
>  This change breaks compilation on OS X.  Specifically, the echo -n line in
> guess-rev.sh doesn't work correctly.  This is in the man page for echo:
>
>      Some shells may provide a builtin echo command which is similar or
> iden-
>      tical to this utility.  Most notably, the builtin echo in sh(1) does
> not
>      accept the -n option.  Consult the builtin(1) manual page.
>
>  I'm guessing that the switch to /bin/sh caused -n to be interpreted as part
> of the echo.  So, guess-rev now outputs:
>
>  -n 1334\n
>
>  instead of
>
>  1334
>
>  If bash isn't availabe with msys, what is another solution?
>  --
>  Rick Altherr
>  kc8...@kc8apf.net

Bash is available with the MSYS version I'm using. But anyway I read
that using printf is more portable than echo -n:

printf "%s" whatever

Perhaps use printf %s and leave it with the more generic /bin/sh?
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to