Author: jbellis
Date: Thu Sep 29 01:44:14 2011
New Revision: 1177149

URL: http://svn.apache.org/viewvc?rev=1177149&view=rev
Log:
Fix tool .bat files when CASSANDRA_HOME contains spaces
patch by Tim Almdal; reviewed by jbellis for CASSANDRA-3258

Modified:
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/bin/json2sstable.bat
    cassandra/branches/cassandra-0.8/bin/nodetool.bat
    cassandra/branches/cassandra-0.8/bin/sstable2json.bat
    cassandra/branches/cassandra-0.8/bin/sstablekeys.bat

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1177149&r1=1177148&r2=1177149&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Thu Sep 29 01:44:14 2011
@@ -13,6 +13,8 @@
  * Keep SimpleSnitch proximity ordering unchanged from what the Strategy
    generates, as intended (CASSANDRA-3262)
  * fix Scrub compaction finishing (CASSANDRA-3255)
+ * Fix tool .bat files when CASSANDRA_HOME contains spaces (CASSANDRA-3258)
+
 
 0.8.6
  * revert CASSANDRA-2388

Modified: cassandra/branches/cassandra-0.8/bin/json2sstable.bat
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/bin/json2sstable.bat?rev=1177149&r1=1177148&r2=1177149&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/bin/json2sstable.bat (original)
+++ cassandra/branches/cassandra-0.8/bin/json2sstable.bat Thu Sep 29 01:44:14 
2011
@@ -18,7 +18,7 @@
 if "%OS%" == "Windows_NT" setlocal
 
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
+if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF="%CASSANDRA_HOME%\conf"
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableImport
 if NOT DEFINED JAVA_HOME goto err
 
@@ -29,10 +29,10 @@ set JAVA_OPTS=^
 REM ***** CLASSPATH library setting *****
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH=%CASSANDRA_HOME%\conf
+set CLASSPATH="%CASSANDRA_HOME%\conf"
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append %%~fi
 goto okClasspath
 
 :append
@@ -41,7 +41,7 @@ goto :eof
 
 :okClasspath
 REM Include the build\classes\main directory so it works in development
-set 
CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes\main;%CASSANDRA_CONF%;%CASSANDRA_HOME%\build\classes\thrift
+set 
CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\thrift"
 
 set CASSANDRA_PARAMS=
 set TOOLS_PARAMS=

Modified: cassandra/branches/cassandra-0.8/bin/nodetool.bat
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/bin/nodetool.bat?rev=1177149&r1=1177148&r2=1177149&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/bin/nodetool.bat (original)
+++ cassandra/branches/cassandra-0.8/bin/nodetool.bat Thu Sep 29 01:44:14 2011
@@ -21,7 +21,7 @@ if NOT DEFINED CASSANDRA_HOME set CASSAN
 if NOT DEFINED JAVA_HOME goto err
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH=%CASSANDRA_HOME%\conf
+set CLASSPATH="%CASSANDRA_HOME%\conf"
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
 rem for %%i in (%CASSANDRA_HOME%\lib*.jar) do call :append %%~fi
@@ -34,7 +34,7 @@ goto :eof
 
 :okClasspath
 REM Include the build\classes\main directory so it works in development
-set 
CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes\main;%CASSANDRA_HOME%\build\classes\thrift
+set 
CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";"%CASSANDRA_HOME%\build\classes\thrift"
 goto runNodeTool
 
 :runNodeTool

Modified: cassandra/branches/cassandra-0.8/bin/sstable2json.bat
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/bin/sstable2json.bat?rev=1177149&r1=1177148&r2=1177149&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/bin/sstable2json.bat (original)
+++ cassandra/branches/cassandra-0.8/bin/sstable2json.bat Thu Sep 29 01:44:14 
2011
@@ -18,7 +18,7 @@
 if "%OS%" == "Windows_NT" setlocal
 
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
+if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF="%CASSANDRA_HOME%\conf"
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
 if NOT DEFINED JAVA_HOME goto err
 
@@ -29,10 +29,10 @@ set JAVA_OPTS=^
 REM ***** CLASSPATH library setting *****
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH=%CASSANDRA_HOME%\conf
+set CLASSPATH="%CASSANDRA_HOME%\conf"
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append %%~fi
 goto okClasspath
 
 :append
@@ -41,7 +41,7 @@ goto :eof
 
 :okClasspath
 REM Include the build\classes\main directory so it works in development
-set 
CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes\main;%CASSANDRA_CONF%;%CASSANDRA_HOME%\build\classes\thrift
+set 
CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\thrift"
 
 set CASSANDRA_PARAMS=
 set TOOLS_PARAMS=

Modified: cassandra/branches/cassandra-0.8/bin/sstablekeys.bat
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/bin/sstablekeys.bat?rev=1177149&r1=1177148&r2=1177149&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/bin/sstablekeys.bat (original)
+++ cassandra/branches/cassandra-0.8/bin/sstablekeys.bat Thu Sep 29 01:44:14 
2011
@@ -18,7 +18,7 @@
 if "%OS%" == "Windows_NT" setlocal
 
 if NOT DEFINED CASSANDRA_HOME set CASSANDRA_HOME=%~dp0..
-if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF=%CASSANDRA_HOME%\conf
+if NOT DEFINED CASSANDRA_CONF set CASSANDRA_CONF="%CASSANDRA_HOME%\conf"
 if NOT DEFINED CASSANDRA_MAIN set 
CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
 if NOT DEFINED JAVA_HOME goto err
 
@@ -29,10 +29,10 @@ set JAVA_OPTS=^
 REM ***** CLASSPATH library setting *****
 
 REM Ensure that any user defined CLASSPATH variables are not used on startup
-set CLASSPATH=%CASSANDRA_HOME%\conf
+set CLASSPATH="%CASSANDRA_HOME%\conf"
 
 REM For each jar in the CASSANDRA_HOME lib directory call append to build the 
CLASSPATH variable.
-for %%i in (%CASSANDRA_HOME%\lib\*.jar) do call :append %%~fi
+for %%i in ("%CASSANDRA_HOME%\lib\*.jar") do call :append %%~fi
 goto okClasspath
 
 :append
@@ -41,7 +41,7 @@ goto :eof
 
 :okClasspath
 REM Include the build\classes\main directory so it works in development
-set 
CASSANDRA_CLASSPATH=%CLASSPATH%;%CASSANDRA_HOME%\build\classes\main;%CASSANDRA_CONF%;%CASSANDRA_HOME%\build\classes\thrift
+set 
CASSANDRA_CLASSPATH=%CLASSPATH%;"%CASSANDRA_HOME%\build\classes\main";%CASSANDRA_CONF%;"%CASSANDRA_HOME%\build\classes\thrift"
 
 set CASSANDRA_PARAMS=
 set TOOLS_PARAMS=


Reply via email to