Author: isapir
Date: Mon Jul  2 06:03:21 2018
New Revision: 1834817

URL: http://svn.apache.org/viewvc?rev=1834817&view=rev
Log:
Updated makebase scripts per feedback

Modified:
    tomcat/trunk/bin/makebase.bat
    tomcat/trunk/bin/makebase.sh

Modified: tomcat/trunk/bin/makebase.bat
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/makebase.bat?rev=1834817&r1=1834816&r2=1834817&view=diff
==============================================================================
--- tomcat/trunk/bin/makebase.bat (original)
+++ tomcat/trunk/bin/makebase.bat Mon Jul  2 06:03:21 2018
@@ -16,10 +16,12 @@
 :: This script creates the directory structure required for running Tomcat 
 :: in a separate directory by pointing %CATALINA_BASE% to it. It copies the
 :: conf directory from %CATALINA_HOME%, and creates empty directories for
-:: logs, temp, webapps, and work.
+:: bin, lib, logs, temp, webapps, and work.
 ::
 :: If the file %CATALINA_HOME%/bin/setenv.sh exists then it is copied to
 :: the target directory as well.
+::
+:: Usage: makebase <path-to-target-directory>
 
 @echo off
 
@@ -49,8 +51,10 @@ if exist %BASE_TGT% (
     mkdir %BASE_TGT%
 )
 
-:: create empty directories for bin, logs, temp, webapps, and work
-mkdir %BASE_TGT%\bin %BASE_TGT%\logs %BASE_TGT%\temp %BASE_TGT%\webapps 
%BASE_TGT%\work
+:: create empty directories for bin, lib, logs, temp, webapps, and work
+for %%d in (bin, lib, logs, temp, webapps, work) do (
+    mkdir "%BASE_TGT%\%%d"
+)
 
 :: copy conf directory
 robocopy %HOME_DIR%\conf %BASE_TGT%\conf > nul
@@ -60,8 +64,8 @@ robocopy %HOME_DIR%\bin %BASE_TGT%\bin s
 
 echo "Created CATALINA_BASE directory at $BASE_TGT"
 
-echo "Attention: The ports in server.xml might be bound by a "
-echo "           different instance. Each instance must bind "
-echo "           to a unique host:port combination."
+echo "Attention: The ports in conf/server.xml might be bound by a "
+echo "           different instance. Please review your config files "
+echo "           and update them where necessary."
 
 :EOF

Modified: tomcat/trunk/bin/makebase.sh
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/makebase.sh?rev=1834817&r1=1834816&r2=1834817&view=diff
==============================================================================
--- tomcat/trunk/bin/makebase.sh (original)
+++ tomcat/trunk/bin/makebase.sh Mon Jul  2 06:03:21 2018
@@ -18,10 +18,12 @@
 # This script creates the directory structure required for running Tomcat 
 # in a separate directory by pointing $CATALINA_BASE to it. It copies the
 # conf directory from $CATALINA_HOME, and creates empty directories for
-# bin, logs, temp, webapps, and work.
+# bin, lib, logs, temp, webapps, and work.
 #
 # If the file $CATALINA_HOME/bin/setenv.sh exists then it is copied to
 # the target directory as well.
+#
+# Usage: makebase <path-to-target-directory>
 
 # first arg is the target directory
 BASE_TGT=$1
@@ -47,11 +49,10 @@ else
     mkdir -p ${BASE_TGT}
 fi
 
-for dir in bin logs temp webapps work; 
+for dir in bin lib logs temp webapps work; 
 do 
     # copy directory with permissions and delete contents if any
-    cp -a "${HOME_DIR}/${dir}" "${BASE_TGT}/${dir}"
-    rm -fr "${BASE_TGT}/${dir}"/*
+    mkdir "${BASE_TGT}/${dir}"
 done
 
 # copy conf directory recursively and preserve permissions
@@ -63,6 +64,6 @@ cp -a "${HOME_DIR}/conf" "${BASE_TGT}/"
 
 echo "Created CATALINA_BASE directory at $BASE_TGT"
 
-echo "Attention: The ports in server.xml might be bound by a "
-echo "           different instance. Each instance must bind "
-echo "           to a unique host:port combination."
+echo "Attention: The ports in conf/server.xml might be bound by a "
+echo "           different instance. Please review your config files "
+echo "           and update them where necessary."



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to