blob: 1db948b4d6bb139d9761bc2d79db9dd089361083 [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
19rem
20rem $Id: karaf.bat 979 2005-11-30 22:50:55Z bsnyder $
21rem
22
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
61:EXECUTE
62 start "Karaf" /MIN "%KARAF_HOME%\bin\karaf.bat" server
63
64rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
65
66:END
67
68endlocal
69
70if not "%PAUSE%" == "" pause
71
72:END_NO_PAUSE