The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

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
No related merge requests found
...@@ -13,21 +13,21 @@ rem ################################################## ...@@ -13,21 +13,21 @@ rem ##################################################
rem # Set SOLR_HOME rem # Set SOLR_HOME
rem ################################################## rem ##################################################
if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound 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 rem fix the problem before we give up completely
if exist vufind.bat goto usevufindbat if exist env.bat goto useenvbat
rem If vufind.bat doesn't exist, the user hasn't run the installer yet. rem If env.bat doesn't exist, the user hasn't run the installer yet.
echo ERROR: vufind.bat does not exist -- could not set up environment. echo ERROR: env.bat does not exist -- could not set up environment.
echo Please run install.php to correct this problem. echo Please run install.php to correct this problem.
goto end goto end
:usevufindbat :useenvbat
call vufind > nul call env > nul
if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound
echo You need to set the VUFIND_HOME environmental variable before running this script. echo You need to set the VUFIND_HOME environmental variable before running this script.
goto end goto end
:vufindhomefound :vufindhomefound
if not "!%SOLR_HOME%!"=="!!" goto solrhomefound if not "!%SOLR_HOME%!"=="!!" goto solrhomefound
set SOLR_HOME=%VUFIND_HOME%\solr set SOLR_HOME=%VUFIND_HOME%\solr\vufind
:solrhomefound :solrhomefound
rem ##################################################### rem #####################################################
...@@ -41,11 +41,11 @@ set JAVA="%JAVA_HOME%\bin\java" ...@@ -41,11 +41,11 @@ set JAVA="%JAVA_HOME%\bin\java"
:javaset :javaset
cd %VUFIND_HOME%\import 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 bib_index=%SOLR_HOME%\biblio\index
SET auth_index=%SOLR_HOME%\vufind\authority\index SET auth_index=%SOLR_HOME%\authority\index
SET index_dir=%SOLR_HOME%\vufind\alphabetical_browse SET index_dir=%SOLR_HOME%\alphabetical_browse
rem ##################################################### rem #####################################################
rem If we're being called for the build_browse function, jump there now: rem If we're being called for the build_browse function, jump there now:
......
...@@ -10,18 +10,21 @@ else ...@@ -10,18 +10,21 @@ else
JAVA="java" JAVA="java"
fi fi
if [ "$SOLR_HOME" ] if [ -z "$VUFIND_HOME" ]
then then
SOLR_HOME="$SOLR_HOME" VUFIND_HOME=`dirname $0`
else fi
SOLR_HOME="`dirname $0`/solr"
if [ -z "$SOLR_HOME" ]
then
SOLR_HOME="$VUFIND_HOME/solr/vufind"
fi fi
set -e set -e
set -x set -x
cd "`dirname $0`/import" 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 # make index work with replicated index
# current index is stored in the last line of index.properties # current index is stored in the last line of index.properties
...@@ -45,9 +48,9 @@ function locate_index ...@@ -45,9 +48,9 @@ function locate_index
eval $targetVar="$indexDir/$subDir" eval $targetVar="$indexDir/$subDir"
} }
locate_index "bib_index" "${SOLR_HOME}/vufind/biblio" locate_index "bib_index" "${SOLR_HOME}/biblio"
locate_index "auth_index" "${SOLR_HOME}/vufind/authority" locate_index "auth_index" "${SOLR_HOME}/authority"
index_dir="${SOLR_HOME}/vufind/alphabetical_browse" index_dir="${SOLR_HOME}/alphabetical_browse"
mkdir -p "$index_dir" 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