blob: 3b875cddc84dd6f44fd84fba92886313d2d8388b [file] [log] [blame]
Gert Vanthienenc4f3d352009-09-24 23:18:33 +00001@echo off
2rem
3rem
4rem Licensed to the Apache Software Foundation (ASF) under one or more
5rem contributor license agreements. See the NOTICE file distributed with
6rem this work for additional information regarding copyright ownership.
7rem The ASF licenses this file to You under the Apache License, Version 2.0
8rem (the "License"); you may not use this file except in compliance with
9rem the License. You may obtain a copy of the License at
10rem
11rem http://www.apache.org/licenses/LICENSE-2.0
12rem
13rem Unless required by applicable law or agreed to in writing, software
14rem distributed under the License is distributed on an "AS IS" BASIS,
15rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16rem See the License for the specific language governing permissions and
17rem limitations under the License.
18rem
Guillaume Nodet1da9ce12010-01-18 14:34:26 +000019rem
Gert Vanthienenc4f3d352009-09-24 23:18:33 +000020rem $Id: karaf.bat 979 2005-11-30 22:50:55Z bsnyder $
Guillaume Nodet1da9ce12010-01-18 14:34:26 +000021rem
Gert Vanthienenc4f3d352009-09-24 23:18:33 +000022
23if not "%ECHO%" == "" echo %ECHO%
24
25setlocal
26set DIRNAME=%~dp0%
27set PROGNAME=%~nx0%
28set ARGS=%*
29
30title Karaf
31
32goto BEGIN
33
34:warn
35 echo %PROGNAME%: %*
36goto :EOF
37
38:BEGIN
39
40rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
41
42if not "%KARAF_HOME%" == "" (
43 call :warn Ignoring predefined value for KARAF_HOME
44)
45set KARAF_HOME=%DIRNAME%..
46if not exist "%KARAF_HOME%" (
47 call :warn KARAF_HOME is not valid: %KARAF_HOME%
48 goto END
49)
50
51if not "%KARAF_BASE%" == "" (
52 if not exist "%KARAF_BASE%" (
53 call :warn KARAF_BASE is not valid: %KARAF_BASE%
54 goto END
55 )
56)
57if "%KARAF_BASE%" == "" (
58 set KARAF_BASE=%KARAF_HOME%
59)
60
Guillaume Nodet1da9ce12010-01-18 14:34:26 +000061:EXECUTE
62 "%KARAF_HOME%\bin\karaf.bat" stop
Gert Vanthienenc4f3d352009-09-24 23:18:33 +000063
64rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
65
66:END
67
68endlocal
69
70if not "%PAUSE%" == "" pause
71
Guillaume Nodet1da9ce12010-01-18 14:34:26 +000072:END_NO_PAUSE