export-ldif.bat revision f9aaabbf1990966a3cbad07df9c21841d4a94e2c
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan@echo off
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem CDDL HEADER START
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem The contents of this file are subject to the terms of the
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem Common Development and Distribution License, Version 1.0 only
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem (the "License"). You may not use this file except in compliance
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem with the License.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem You can obtain a copy of the license at
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem trunk/opends/resource/legal-notices/OpenDS.LICENSE
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem See the License for the specific language governing permissions
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem and limitations under the License.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem When distributing Covered Code, include this CDDL HEADER in each
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem file and include the License file at
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem add the following below this CDDL HEADER, with the fields enclosed
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem by brackets "[]" replaced with your own identifying * information:
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem Portions Copyright [yyyy] [name of copyright owner]
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem CDDL HEADER END
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanrem
54f30b716553d88ea9ebb010037f4c74eb1d69acPaul Bryanrem Portions Copyright 2006 Sun Microsystems, Inc.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordossetlocal
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordosset DIR_HOME=%~dP0..
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordosset INSTANCE_ROOT=%DIR_HOME%
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordosif "%JAVA_BIN%" == "" goto noJavaBin
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordosgoto setClassPath
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordos:noJavaBin
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordosif "%JAVA_HOME%" == "" goto noJavaHome
e5c203467ee4398ae81a6adb63da7477451b2e77Laszlo Hordosif not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanset JAVA_BIN="%JAVA_HOME%\bin\java.exe"
a14db14686bf9f6817c47e5c14e887d74dd615f0Laszlo Hordosgoto setClassPath
ea4e1677db025129d955e5c45022796001b75049Andi Egloff
f85a185a657def022f6d8896cc755403f7d40694Andi Egloff:noJavaHome
a14db14686bf9f6817c47e5c14e887d74dd615f0Laszlo Hordosecho Error: JAVA_HOME environment variable is not set.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryanecho Please set it to a valid Java 5 installation.
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryangoto end
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan
1965c5d21403c3d66eb1efa29c670378311b1077Paul Bryan:setClassPath
87723f2895f37176408ecb9037bb77388cc5a008Andi EgloffFOR %%x in ("%DIR_HOME%\lib\*.jar") DO call "%DIR_HOME%\bin\setcp.bat" %%x
dd37dcbebe120d68ca67144b7f943f0317deda38Andi Egloff
2405d78a1465b67cfb214d2008ec2a25bdd332b4Laszlo Hordoscd %DIR_HOME%
2405d78a1465b67cfb214d2008ec2a25bdd332b4Laszlo Hordos
2405d78a1465b67cfb214d2008ec2a25bdd332b4Laszlo Hordos%JAVA_BIN% %JAVA_ARGS% -classpath "%CLASSPATH%" org.opends.server.tools.ExportLDIF --configClass org.opends.server.config.ConfigFileHandler --configFile "%DIR_HOME%\config\config.ldif" %*
2405d78a1465b67cfb214d2008ec2a25bdd332b4Laszlo Hordos
2405d78a1465b67cfb214d2008ec2a25bdd332b4Laszlo Hordos
2405d78a1465b67cfb214d2008ec2a25bdd332b4Laszlo Hordos:end
2405d78a1465b67cfb214d2008ec2a25bdd332b4Laszlo Hordos
2405d78a1465b67cfb214d2008ec2a25bdd332b4Laszlo Hordos