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