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