"Fossies" - the Fresh Open Source Software Archive

Member "OpenDS-2.2.1/setup.bat" (6 Oct 2010, 2451 Bytes) of archive /linux/misc/OpenDS-2.2.1.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) DOS Batch source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 @echo off
    3 rem CDDL HEADER START
    4 rem
    5 rem The contents of this file are subject to the terms of the
    6 rem Common Development and Distribution License, Version 1.0 only
    7 rem (the "License").  You may not use this file except in compliance
    8 rem with the License.
    9 rem
   10 rem You can obtain a copy of the license at
   11 rem trunk/opends/resource/legal-notices/OpenDS.LICENSE
   12 rem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
   13 rem See the License for the specific language governing permissions
   14 rem and limitations under the License.
   15 rem
   16 rem When distributing Covered Code, include this CDDL HEADER in each
   17 rem file and include the License file at
   18 rem trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
   19 rem add the following below this CDDL HEADER, with the fields enclosed
   20 rem by brackets "[]" replaced with your own identifying information:
   21 rem      Portions Copyright [yyyy] [name of copyright owner]
   22 rem
   23 rem CDDL HEADER END
   24 rem
   25 rem
   26 rem      Copyright 2006-2008 Sun Microsystems, Inc.
   27 
   28 setlocal
   29 
   30 rem check that the path does not contain the ^% character which breaks
   31 rem the batch files.
   32 for %%i in (%~sf0) do set NON_ESCAPED=%%~dPsi..
   33 
   34 
   35 FOR /F "tokens=1-2* delims=%%" %%1 IN ("%NON_ESCAPED%") DO (
   36 if NOT "%%2" == "" goto invalidPath)
   37 
   38 for %%i in (%~sf0) do set DIR_HOME=%%~dPsi.
   39 
   40 set INSTALL_ROOT=%DIR_HOME%
   41 set INSTANCE_DIR=
   42 for /f "delims=" %%a in (%INSTALL_ROOT%\instance.loc) do (
   43   set INSTANCE_DIR=%%a
   44 )
   45 set CUR_DIR=%~dp0
   46 cd /d %INSTALL_ROOT%
   47 cd /d %INSTANCE_DIR%
   48 set INSTANCE_ROOT=%CD%
   49 cd /d %CUR_DIR%
   50 
   51 set SCRIPT_NAME=setup
   52 
   53 rem Set environment variables and test java
   54 set SCRIPT_UTIL_CMD=set-full-environment-and-test-java
   55 call "%INSTALL_ROOT%\lib\_script-util.bat"
   56 if NOT %errorlevel% == 0 exit /B %errorlevel%
   57 
   58 if "%~1" == "" goto callLaunch
   59 goto callJava
   60 
   61 :invalidPath
   62 echo Error: The current path contains a %% character.  OpenDS cannot
   63 echo        be installed on a path containing this character.
   64 pause
   65 goto end
   66 
   67 :callLaunch
   68 "%INSTALL_ROOT%\lib\winlauncher.exe" launch "%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.quicksetup.installer.SetupLauncher
   69 goto end
   70 
   71 :callJava
   72 "%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.quicksetup.installer.SetupLauncher %*
   73 
   74 rem return part
   75 if %errorlevel% == 50 goto version
   76 goto end
   77 
   78 :version
   79 rem version information was requested. Return code should be 0.
   80 exit /B 0
   81 
   82 :end