From 9cdf074f28cbdf06b336e114fec00f44076f009b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 15 Jun 2016 13:57:12 +0200 Subject: [PATCH] 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 Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart --- debian/scripts/koha-rebuild-zebra | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/scripts/koha-rebuild-zebra b/debian/scripts/koha-rebuild-zebra index 0eb68d0..d131207 100755 --- a/debian/scripts/koha-rebuild-zebra +++ b/debian/scripts/koha-rebuild-zebra @@ -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 -- 2.1.4