Skip to content
Snippets Groups Projects
Commit 517ac465 authored by Demian Katz's avatar Demian Katz
Browse files

Fix problems with index-alphabetic-browse scripts.

- Windows script was broken due to vufind.bat references
- SOLR_HOME variable was used inconsistently with solr.sh; now both scripts point the variable to the same place
- Resolves VUFIND-1171
parent 3acb1df8
Branches
Tags
No related merge requests found
......@@ -13,21 +13,21 @@ rem ##################################################
rem # Set SOLR_HOME
rem ##################################################
if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound
rem VUFIND_HOME not set -- try to call vufind.bat to
rem VUFIND_HOME not set -- try to call env.bat to
rem fix the problem before we give up completely
if exist vufind.bat goto usevufindbat
rem If vufind.bat doesn't exist, the user hasn't run the installer yet.
echo ERROR: vufind.bat does not exist -- could not set up environment.
if exist env.bat goto useenvbat
rem If env.bat doesn't exist, the user hasn't run the installer yet.
echo ERROR: env.bat does not exist -- could not set up environment.
echo Please run install.php to correct this problem.
goto end
:usevufindbat
call vufind > nul
:useenvbat
call env > nul
if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound
echo You need to set the VUFIND_HOME environmental variable before running this script.
goto end
:vufindhomefound
if not "!%SOLR_HOME%!"=="!!" goto solrhomefound
set SOLR_HOME=%VUFIND_HOME%\solr
set SOLR_HOME=%VUFIND_HOME%\solr\vufind
:solrhomefound
rem #####################################################
......@@ -41,11 +41,11 @@ set JAVA="%JAVA_HOME%\bin\java"
:javaset
cd %VUFIND_HOME%\import
SET CLASSPATH="browse-indexing.jar;%SOLR_HOME%\vufind\jars\*;%SOLR_HOME%\vendor\contrib\analysis-extras\lib\*;%SOLR_HOME%\vendor\server\solr-webapp\webapp\WEB-INF\lib\*"
SET CLASSPATH="browse-indexing.jar;%SOLR_HOME%\jars\*;%SOLR_HOME%\..\vendor\contrib\analysis-extras\lib\*;%SOLR_HOME%\..\vendor\server\solr-webapp\webapp\WEB-INF\lib\*"
SET bib_index=%SOLR_HOME%\vufind\biblio\index
SET auth_index=%SOLR_HOME%\vufind\authority\index
SET index_dir=%SOLR_HOME%\vufind\alphabetical_browse
SET bib_index=%SOLR_HOME%\biblio\index
SET auth_index=%SOLR_HOME%\authority\index
SET index_dir=%SOLR_HOME%\alphabetical_browse
rem #####################################################
rem If we're being called for the build_browse function, jump there now:
......
......@@ -10,18 +10,21 @@ else
JAVA="java"
fi
if [ "$SOLR_HOME" ]
if [ -z "$VUFIND_HOME" ]
then
SOLR_HOME="$SOLR_HOME"
else
SOLR_HOME="`dirname $0`/solr"
VUFIND_HOME=`dirname $0`
fi
if [ -z "$SOLR_HOME" ]
then
SOLR_HOME="$VUFIND_HOME/solr/vufind"
fi
set -e
set -x
cd "`dirname $0`/import"
CLASSPATH="browse-indexing.jar:${SOLR_HOME}/vufind/jars/*:${SOLR_HOME}/vendor/contrib/analysis-extras/lib/*:${SOLR_HOME}/vendor/server/solr-webapp/webapp/WEB-INF/lib/*"
CLASSPATH="browse-indexing.jar:${SOLR_HOME}/jars/*:${SOLR_HOME}/../vendor/contrib/analysis-extras/lib/*:${SOLR_HOME}/../vendor/server/solr-webapp/webapp/WEB-INF/lib/*"
# make index work with replicated index
# current index is stored in the last line of index.properties
......@@ -45,9 +48,9 @@ function locate_index
eval $targetVar="$indexDir/$subDir"
}
locate_index "bib_index" "${SOLR_HOME}/vufind/biblio"
locate_index "auth_index" "${SOLR_HOME}/vufind/authority"
index_dir="${SOLR_HOME}/vufind/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"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment