On Wed, Aug 14, 2013 at 04:36:25AM +0900, Hiroki Sato wrote: > Glen Barber <[email protected]> wrote > in <[email protected]>: > > gj> On Tue, Aug 13, 2013 at 11:31:52AM -0600, Ian Lepore wrote: > gj> > I'm not even sure what $0 *should* expand to in a script that was > gj> > sourced in. The manpage doesn't say anything meaningful to me about it. > gj> > Maybe it's a kind of "indeterminate results" thing which is pretty much > gj> > what we're seeing. > gj> > > gj> > gj> When the file is sourced, it should expand to the name of the file > gj> sourcing the file. > > It is sourced in the osreldate.h target in Makefile, so $0 will be > /bin/sh. Why $0 is used here in the first place? The previous > version used $SYSDIR and it looks more reasonable to me. >
$0 is used to speed up execution of svnversion when evaluating if the
${svnversion} is compatible with the tree. Rather than running on the
entire tree, $0 should only be run on a single file.
But, I am at the point now of being ready to revert all these changes
back to the original newvers.sh before I added svnliteversion...
Glen
pgp5LgSdHSVJb.pgp
Description: PGP signature
