Skip to content

Commit

Permalink
Simplify Windows *.bat files: remove %OS% checks, as current java doe…
Browse files Browse the repository at this point in the history
…s not run on ancient non-NT operating systems.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1568768 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Konstantin Kolinko committed Feb 16, 2014
1 parent 7d18276 commit 8920cbf
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 13 deletions.
8 changes: 2 additions & 6 deletions bin/catalina.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Start/Stop Script for the CATALINA Server
rem
Expand Down Expand Up @@ -92,6 +91,8 @@ rem Example (all one line)
rem set TITLE=Tomcat.Cluster#1.Server#1 [%DATE% %TIME%]
rem ---------------------------------------------------------------------------

setlocal

rem Suppress Terminate batch job on CTRL+C
if not ""%1"" == ""run"" goto mainEntry
if "%TEMP%" == "" goto mainEntry
Expand Down Expand Up @@ -277,13 +278,8 @@ goto execCmd

:doStart
shift
if not "%OS%" == "Windows_NT" goto noTitle
if "%TITLE%" == "" set TITLE=Tomcat
set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
goto gotTitle
:noTitle
set _EXECJAVA=start %_RUNJAVA%
:gotTitle
if not ""%1"" == ""-security"" goto execCmd
shift
echo Using Security Manager
Expand Down
3 changes: 2 additions & 1 deletion bin/configtest.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Configuration test script for the CATALINA Server
rem ---------------------------------------------------------------------------

setlocal

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
Expand Down
3 changes: 2 additions & 1 deletion bin/digest.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Script to digest password using the algorithm specified
rem ---------------------------------------------------------------------------

setlocal

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
Expand Down
3 changes: 2 additions & 1 deletion bin/service.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem NT Service Install/Uninstall script
rem
Expand All @@ -27,6 +26,8 @@ rem name (optional) If the second argument is present it is considered
rem to be new service name
rem ---------------------------------------------------------------------------

setlocal

set "SELF=%~dp0%service.bat"
rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
Expand Down
3 changes: 2 additions & 1 deletion bin/shutdown.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Stop script for the CATALINA Server
rem ---------------------------------------------------------------------------

setlocal

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
Expand Down
3 changes: 2 additions & 1 deletion bin/startup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Start script for the CATALINA Server
rem ---------------------------------------------------------------------------

setlocal

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
Expand Down
3 changes: 2 additions & 1 deletion bin/tool-wrapper.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Wrapper script for command line tools
rem
Expand All @@ -40,6 +39,8 @@ rem It can also be used to update the XML parser implementatio
rem Defaults to $CATALINA_HOME/endorsed.
rem ---------------------------------------------------------------------------

setlocal

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
Expand Down
3 changes: 2 additions & 1 deletion bin/version.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

if "%OS%" == "Windows_NT" setlocal
rem ---------------------------------------------------------------------------
rem Version script for the CATALINA Server
rem ---------------------------------------------------------------------------

setlocal

rem Guess CATALINA_HOME if not defined
set "CURRENT_DIR=%cd%"
if not "%CATALINA_HOME%" == "" goto gotHome
Expand Down

0 comments on commit 8920cbf

Please sign in to comment.