-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike Noyes wrote:
> On Wed, 2006-03-29 at 14:07, KP Kirchdoerfer wrote:
>> Am Mittwoch, 29. März 2006 23:13 schrieb Mike Noyes:
>> > Here is an early run of our new document build script. I'm using the
>> > default docbook xsl currently. I'll work on a customization layer after
>> > initial build testing, etc. are complete.
>> >
>> >         http://leaf-project.org/doc/new/
>> 
>>  does that mean changes will be updated by a cron job again? Would be great!
> 
> KP,
> Not yet. I'm still working on doc-build.sh. The current revision in cvs
> is 1.6.
> 
> Pending: 
>         * feedback on shell code in doc-build.sh

I finally got a few free minutes to look at this.

Your script looks very clean except for one issue with the check_errors
function.  You're removing the lockfile in this routine, which is
required for expected operation if one of the document building commands
fails.  You are also using the check_errors procedure for testing
whether the lockfile generation worked or not.  That means if you run
this script while another instance is already running, it will not be
able to grab the lockfile, but will then forcibly remove the lockfile
without owning it (a BadThing :).

It looks like the easiest way to handle this is to special case the
create_lockfile error checking (ie: put the logic inside the
create_lockfile function).  If you want the lockfile forcibly grabbed
after some amount of time (ie: 8 to 24 hours or so...something that's
much longer than document generation should normally take), you can do
this with the -l switch, ie:

  lockfile -l 72000 ...

would force removal of any existing lockfile older than 20 hours.

- --
Charles Steinkuehler
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEKxcHLywbqEHdNFwRAgdLAJ9aSDUi05ATZ4uCC/qZgQQmyjPSLQCgxmq0
HycMVYykWU01rZ4KdGwcDtw=
=kWfM
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

_______________________________________________
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to