Bug 16733: Adjust koha-rebuild-zebra
[1] Add a call to the new adjust_paths_dev_install [2] Differentiate location of rebuild_zebra.pl [3] Replace a hardcoded path by $PERL5LIB Test plan: Adjust a biblio record in package or dev install. Run koha-rebuild-zebra -b -z for same instance. Verify that the change has been indexed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
2fc1b469e2
commit
2a7d595736
|
|
@ -56,12 +56,18 @@ run_rebuild_zebra()
|
|||
[ "${full_reindex}" = "yes" ] ||
|
||||
[ "${force}" = "yes" ] ; then
|
||||
|
||||
if [ "$DEV_INSTALL" = "" ]; then
|
||||
KOHA_BINDIR=$KOHA_HOME/bin
|
||||
else
|
||||
KOHA_BINDIR=$KOHA_HOME/misc
|
||||
fi
|
||||
|
||||
# TODO: This comment is here to remind us that we should make
|
||||
# rebuild_zebra.pl return error codes on failure
|
||||
if sudo -u "$instancename-koha" -H \
|
||||
env PERL5LIB=/usr/share/koha/lib \
|
||||
env PERL5LIB=$PERL5LIB \
|
||||
KOHA_CONF="/etc/koha/sites/$instancename/koha-conf.xml" \
|
||||
/usr/share/koha/bin/migration_tools/rebuild_zebra.pl $@ ; then
|
||||
$KOHA_BINDIR/migration_tools/rebuild_zebra.pl $@ ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
|
@ -148,6 +154,9 @@ while [ -n "$*" ]; do
|
|||
shift
|
||||
done
|
||||
|
||||
# Optionally use alternative paths for a dev install
|
||||
adjust_paths_dev_install $1
|
||||
|
||||
# Parse command line.
|
||||
if [ $# -lt 1 ]; then
|
||||
if [ "$quiet" = "no" ]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue