Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Getting the CVS revision of Zsh



"Richard Hartmann" wrote:
> On Fri, Jan 9, 2009 at 12:21, Peter Stephenson <pws@xxxxxxx> wrote:
> 
> >  cvs status ChangeLog | awk '/Working revision:/ { print $3 }'
> >
> > to a variable such as $ZSH_PATCHLEVEL.  However, this needs careful
> > handling to make sure it doesn't get run where CVS isn't available.
> 
> I would prefer a file like zsh-revision to be introduced (and synced
> from a CVS hook). That way, the information would make it both into
> tarballs and the various git repositories cloned from the CVS one.
> This file could then be read at compile-time.

If I were doing it, the output would go into zsh_patchlevel.h
which would be distributed and then #include'd where necessary.  The
trick is regenerating that file at the right point and only at the right
point.

Arranging for this always to be updated in CVS on all commits is another
job I would leave to someone else, but provided you "make" and re-commit
it will work.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author