Hi!

Ralph Glasstetter wrote:

>>I added an improved (albeit much simpler) version of Ralph's
>>"setversion" script today 
> 
> Simpler? It will take me a few hours to understand what happens in those 
> 2 lines with getids/sed... ;-)

The command prints the ids of all files (more precisely, the part
between "$Id:" and the trailing "$"), but only if the line is
well-formed (i.e. "/* $Id: ... $ */" or similar). All other lines are
dropped (due to the -n option). Actually, it's grep and text
substitution in a single command - one of my favorite tricks. :-)

> 20 lines of my script replaced by 2 of yours... impressive! :-) 
> But if simpler means shorter, you are right... ;-)

It also got faster - and I got rid of the numbers that were too huge for
old shells (and also 32-bit compilers, by the way). CHANGED and BUILT
are strings now, and the "sort ... | tail" command extracts the latest
entry (which happens to come last when the fields are sorted in
ascending order).

[...]
>>The script is already integrated with the scons build system 
> 
> Aha,... after that sed-magic you now want to become also a SCons-wizard! :)

No, not at all.

>>and the 
>>Windows makefile (although I'm not sure if the latter works correctly),
> 
> I'll test it...

Please update to r62 - it contains a fixed Makefile.w32.

>>so the next time you compile dvbcut, src/version.h should be generated
>>automatically. The resulting binary should display "dvbcut 0.5.4-svn/60"
>>in the titlebar. For non-SVN builds, "-svn" will change to "-release".
>>This is triggered by the presence/absence of the top-level ".svn"
>>subdirectory.
> 
> Perfect!!!
> 
> BTW,.. funny coincidence... just had a look at the "latest&greatest" FFMPEG 
> repository and noticed that there's also a version.sh. They get the revision 
> number from the file ".svn/entries". That way there would be actually no need 
> for the loop over the source files,.... at least if one does not want to know 
> the revision number from a tarball/release!

Which loop? ;)

-- 
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to