[Koha-devel] koha-* scripts revisited

Robin Sheat robin at catalyst.net.nz
Wed Apr 24 01:36:09 CEST 2013


Tomas Cohen Arazi schreef op di 23-04-2013 om 12:24 [-0300]:
> I'd like you to (1) tell me if its ok that I patch them in bash (which
> is what they are written in) and (2) if you have the time, discuss
> here the current and desired semantics for those commands, including
> the option switches.

My feeling about bash vs. perl for these scripts is basically that if
you're not making sweeping changes, bash is fine. If you're more or less
rewriting it (which you're not really), then consider doing it in perl.

For new things, if it's something trivial, bash is fine. If it's more
complex (like koha-create is), perl would be preferred.

I've had a quick look at what you've got so far, and it looks fine.

My feelings on making koha-create more atomic are that this might
require a rewrite in Perl to really do it. Ideally for every operation
performed, we would store the undo operation onto a list. If we
encounter a failure, we play back the undo operations to get everything
back to the initial state. It probably won't be perfect, but I think
it'll be a huge improvement.

However, this would be hard to implement nicely in bash, I suspect.

-- 
Robin Sheat
Catalyst IT Ltd.
✆ +64 4 803 2204
GPG: 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20130424/fbf2d0df/attachment.pgp>


More information about the Koha-devel mailing list