[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Is svnversion misbehaving (there is newline at the end)? (WAS; Re: doc/book request)

From: Jani Averbach <jaa_at_cc.jyu.fi>
Date: 2003-05-08 23:21:31 CEST

On Thu, 8 May 2003, Matt Kraai wrote:
> On Thu, May 08, 2003 at 11:54:25PM +0300, Jani Averbach wrote:
> > Oh well, paint it blue!
> >
> > echo -n '<!ENTITY svn.version "' > $(BOOK_VERSION_SOURCE)
> > $(SVNVERSION) . >> $(BOOK_VERSION_SOURCE)
> > echo '">' >> $(BOOK_VERSION_SOURCE)
> >
> > Which will print:
> > <!ENTITY svn.version "5843
> > ">
> >
> > Hmm, should svnversion _not_ to print last \n? What do you think?
>
> The other solutions consume the newline (since they use
> backticks).

Yes, but in general, is it better to print newline or not to print?
I would be against newline at the end, because I think that svnversion
is mainly for build scripts.
But do you have any case in mind, when there is some advance of it?

> While we're on a roll, for sheer perversity,
>
> echo '<!ENTITY svn.version "'"$$($(SVNVERSION) .)"'">' > $(BOOK_VERSION_SOURCE)
>
> That's right, "'"$$($( baby!

1-0, you win.

BR, Jani

-- 
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 8 23:22:28 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.