Bug 8566: [SIGNED-OFF] Enable koha-foreach to insert the instancename into commands
authorReed Wade <reed@typist.geek.nz>
Thu, 26 Jun 2014 06:24:07 +0000 (02:24 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 2 Jul 2014 18:45:25 +0000 (15:45 -0300)
commitd7a55f58901d7cfd98b846213654df0d7544695b
tree2b195844239da3a73af36f25a712cd406be04fad
parentdccbba1d67fa64d8f48015825ce0fe495bbdcd0c
Bug 8566: [SIGNED-OFF] Enable koha-foreach to insert the instancename into commands

koha-foreach has been modified to replace __instancename__ with $name
on each iteration using sed.

The docbook file for koha-foreach has also been updated to reflect the
new functionality.

To test:

    koha-foreach ls -ld /etc/koha/sites/__instancename__

should list directories instead of giving an error message.

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
The suggested example with ls works as expected, as does my
more complex example with fines.pl:

koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl \
--out /var/log/koha/__instancename__/

The man page looks good too.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
debian/docs/koha-foreach.xml
debian/scripts/koha-foreach