From 53eb0fa91f9790cb1b955ba704781a554aafa807 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 16 Mar 2020 07:26:26 -0400 Subject: [PATCH] Switch back from parentheses to quotes to better handle paths with spaces. --- import-marc.bat | 8 ++++---- index-alphabetic-browse.bat | 10 +++++----- solr.bat | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/import-marc.bat b/import-marc.bat index c4322107e00..2a2bcc96381 100644 --- a/import-marc.bat +++ b/import-marc.bat @@ -60,7 +60,7 @@ set EXTRA_SOLRMARC_SETTINGS=%EXTRA_SOLRMARC_SETTINGS% -Dsolr.core.name=%SOLRCOR rem ################################################## rem # Set VUFIND_HOME rem ################################################## -if not (!%VUFIND_HOME%!)==(!!) goto vufindhomefound +if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound rem VUFIND_HOME not set -- try to call env.bat to rem fix the problem before we give up completely if exist env.bat goto useenvbat @@ -73,7 +73,7 @@ set VUFIND_HOME=%VUFIND_HOME:~0,-1% goto vufindhomefound :useenvbat 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. goto end :vufindhomefound @@ -81,11 +81,11 @@ goto end rem ##################################################### rem # Build java command rem ##################################################### -if not (!%JAVA_HOME%!)==(!!) goto javahomefound +if not "!%JAVA_HOME%!"=="!!" goto javahomefound set JAVA=java goto javaset :javahomefound -set JAVA=%JAVA_HOME%\bin\java +set JAVA="%JAVA_HOME%\bin\java" :javaset rem ################################################## diff --git a/index-alphabetic-browse.bat b/index-alphabetic-browse.bat index ceccbb467fa..d3fa462b43d 100644 --- a/index-alphabetic-browse.bat +++ b/index-alphabetic-browse.bat @@ -12,7 +12,7 @@ goto end rem ################################################## rem # Set SOLR_HOME rem ################################################## -if not (!%VUFIND_HOME%!)==(!!) goto vufindhomefound +if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound rem VUFIND_HOME not set -- try to call env.bat to rem fix the problem before we give up completely if exist env.bat goto useenvbat @@ -25,22 +25,22 @@ set VUFIND_HOME=%VUFIND_HOME:~0,-1% goto vufindhomefound :useenvbat 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. goto end :vufindhomefound -if not (!%SOLR_HOME%!)==(!!) goto solrhomefound +if not "!%SOLR_HOME%!"=="!!" goto solrhomefound set SOLR_HOME=%VUFIND_HOME%\solr\vufind :solrhomefound rem ##################################################### rem # Build java command rem ##################################################### -if not (!%JAVA_HOME%!)==(!!) goto javahomefound +if not "!%JAVA_HOME%!"=="!!" goto javahomefound set JAVA=java goto javaset :javahomefound -set JAVA=%JAVA_HOME%\bin\java +set JAVA="%JAVA_HOME%\bin\java" :javaset cd %VUFIND_HOME%\import diff --git a/solr.bat b/solr.bat index fbce82ff4b6..cff8418c125 100644 --- a/solr.bat +++ b/solr.bat @@ -40,8 +40,8 @@ rem Unrecognized action -- display help text if "!%1!"=="!!" goto usage rem Set VUFIND_HOME (if not already set) -if not (!%VUFIND_HOME%!)==(!!) goto vufindhomefound -rem VUFIND_HOME not set -- try to call env.bat to +if not "!%VUFIND_HOME%!"=="!!" goto vufindhomefound +rem VUFIND_HOME not set -- try to call env.bat to rem fix the problem before we give up completely if exist env.bat goto useenvbat rem If env.bat doesn't exist, the user hasn't run the installer yet. @@ -53,7 +53,7 @@ set VUFIND_HOME=%VUFIND_HOME:~0,-1% goto vufindhomefound :useenvbat 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. goto end :vufindhomefound -- GitLab