From fa5a454a6ad07284afb318a1dc0d951f2cfbfa78 Mon Sep 17 00:00:00 2001 From: "l.osullivan" <l.osullivan@swansea.ac.uk> Date: Mon, 7 Dec 2015 15:33:56 -0500 Subject: [PATCH] Add SOLR_HOME variable for non-standard solr instances --- index-alphabetic-browse.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/index-alphabetic-browse.sh b/index-alphabetic-browse.sh index 60ff54234e2..9f53b798267 100755 --- a/index-alphabetic-browse.sh +++ b/index-alphabetic-browse.sh @@ -10,11 +10,18 @@ else JAVA="java" fi +if [ "$SOLR_HOME" ] +then + SOLR_HOME="$SOLR_HOME" +else + SOLR_HOME="`dirname $0`/solr" +fi + set -e set -x cd "`dirname $0`/import" -CLASSPATH="browse-indexing.jar:../solr/lib/*" +CLASSPATH="browse-indexing.jar:${SOLR_HOME}/lib/*" # make index work with replicated index # current index is stored in the last line of index.properties @@ -38,9 +45,9 @@ function locate_index eval $targetVar="$indexDir/$subDir" } -locate_index "bib_index" "../solr/biblio" -locate_index "auth_index" "../solr/authority" -index_dir="../solr/alphabetical_browse" +locate_index "bib_index" "${SOLR_HOME}/biblio" +locate_index "auth_index" "${SOLR_HOME}/authority" +index_dir="${SOLR_HOME}/alphabetical_browse" mkdir -p "$index_dir" -- GitLab