tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1835123 - /tomcat/trunk/bin/makebase.bat
Date Thu, 05 Jul 2018 11:19:43 GMT
Author: markt
Date: Thu Jul  5 11:19:43 2018
New Revision: 1835123

URL: http://svn.apache.org/viewvc?rev=1835123&view=rev
Log:
Add "..." when using variables that may contain spaces

Modified:
    tomcat/trunk/bin/makebase.bat

Modified: tomcat/trunk/bin/makebase.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/makebase.bat?rev=1835123&r1=1835122&r2=1835123&view=diff
==============================================================================
--- tomcat/trunk/bin/makebase.bat (original)
+++ tomcat/trunk/bin/makebase.bat Thu Jul  5 11:19:43 2018
@@ -45,13 +45,13 @@ goto EOF
 rem first arg is the target directory
 set BASE_TGT=%1
 
-if %BASE_TGT%.==. (
+if "%BASE_TGT%."==. (
     rem target directory not provided; exit
     echo Usage: makebase ^<path-to-target-directory^>
     goto :EOF
 )
 
-if exist %BASE_TGT% (
+if exist "%BASE_TGT%" (
   rem target directory exists
   echo Target directory exists
 
@@ -62,7 +62,7 @@ if exist %BASE_TGT% (
     )
 ) else (
     rem create the target directory
-    mkdir %BASE_TGT%
+    mkdir "%BASE_TGT%"
 )
 
 rem create empty directories
@@ -71,12 +71,12 @@ for %%d in (bin, lib, logs, temp, webapp
 )
 
 rem copy conf directory
-robocopy %CATALINA_HOME%\conf %BASE_TGT%\conf > nul
+robocopy "%CATALINA_HOME%\conf" "%BASE_TGT%\conf" > nul
 
 rem copy setenv.bat if exists
-robocopy %CATALINA_HOME%\bin %BASE_TGT%\bin setenv.bat > nul
+robocopy "%CATALINA_HOME%\bin" "%BASE_TGT%\bin" setenv.bat > nul
 
-echo Created CATALINA_BASE directory at %BASE_TGT%
+echo Created CATALINA_BASE directory at "%BASE_TGT%"
 
 echo Attention: The ports in conf\server.xml might be bound by a
 echo            different instance. Please review your config files



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message