summaryrefslogtreecommitdiffstats
path: root/pki/base/migrate/41ToTxt/src/compile.bat
diff options
context:
space:
mode:
authormharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-10-04 01:17:41 +0000
committermharmsen <mharmsen@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-10-04 01:17:41 +0000
commita4682ceae6774956461edd03b2485bbacea445f4 (patch)
tree94c475a125441da63101738220ce3972cf37db61 /pki/base/migrate/41ToTxt/src/compile.bat
parent0c775428675d2cb1be9551f84e6b741ca813f77e (diff)
downloadpki-IPA_v2_RHEL_6_2_20111003.tar.gz
pki-IPA_v2_RHEL_6_2_20111003.tar.xz
pki-IPA_v2_RHEL_6_2_20111003.zip
Bugzilla Bug #688225 - (dogtagIPAv2.1) TRACKER: of the Dogtag fixes for freeIPA 2.1IPA_v2_RHEL_6_2_20111003
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/tags/IPA_v2_RHEL_6_2_20111003@2252 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/migrate/41ToTxt/src/compile.bat')
-rwxr-xr-xpki/base/migrate/41ToTxt/src/compile.bat150
1 files changed, 150 insertions, 0 deletions
diff --git a/pki/base/migrate/41ToTxt/src/compile.bat b/pki/base/migrate/41ToTxt/src/compile.bat
new file mode 100755
index 000000000..fd92f3fb7
--- /dev/null
+++ b/pki/base/migrate/41ToTxt/src/compile.bat
@@ -0,0 +1,150 @@
+@ECHO OFF
+REM --- BEGIN COPYRIGHT BLOCK ---
+REM Copyright (C) 2007 Red Hat, Inc.
+REM All rights reserved.
+REM --- END COPYRIGHT BLOCK ---
+
+REM
+REM This script creates the "41ToTxt/classes/Main.class" and
+REM "41ToTxt/classes/CMS41LdifParser.class" which are
+REM used to create a normalized CMS 4.1 ldif text file.
+REM
+
+
+SETLOCAL
+
+
+REM
+REM Set SERVER_ROOT - identify the CMS <server_root> used to compile 41ToTxt
+REM
+
+REM SET SERVER_ROOT=C:\cms41
+
+
+REM
+REM Set JDK_VERSION - specify the JDK version used by this version of CMS
+REM
+REM CMS 4.1 NOTE: "WINNT" - 1.1.6
+REM
+
+REM SET JDK_VERSION=CMS_4.1
+
+
+REM
+REM Set JAVA_HOME - specify the complete path to the JDK
+REM
+REM example: \\bermuda.redhat.com\sbc mounted as Y:
+REM
+
+REM SET JAVA_HOME=Y:\cms_jdk\WINNT\%JDK_VERSION%
+
+
+REM
+REM *** DON'T CHANGE ANYTHING BELOW THIS LINE ***
+REM
+
+
+REM
+REM Script-defined constants
+REM
+
+SET CMS="CMS 4.1"
+
+
+REM
+REM Perform a usage check for the appropriate number of arguments:
+REM
+
+IF "%1" == "" GOTO CHECK_ENVIRONMENT_VARIABLES
+
+
+:USAGE
+ECHO.
+ECHO Usage: "%0"
+ECHO.
+ECHO NOTE: No arguments are required to build the
+ECHO normalized %CMS% ldif text classes.
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM Check presence of user-defined variables
+REM
+
+:CHECK_ENVIRONMENT_VARIABLES
+IF !%SERVER_ROOT%==! GOTO ENVIRONMENT_VARIABLES_ERROR
+IF !%JAVA_HOME%==! GOTO ENVIRONMENT_VARIABLES_ERROR
+GOTO CHECK_SERVER_ROOT
+
+
+:ENVIRONMENT_VARIABLES_ERROR
+ECHO ERROR: Please specify the SERVER_ROOT and JAVA_HOME
+ECHO environment variables for this script!
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM Check that the specified SERVER_ROOT exists
+REM
+
+:CHECK_SERVER_ROOT
+IF EXIST %SERVER_ROOT% GOTO CHECK_JAVA_HOME
+
+
+ECHO ERROR: The specified SERVER_ROOT does not exist!
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM Check that the specified JAVA_HOME exists
+REM
+
+:CHECK_JAVA_HOME
+IF EXIST %JAVA_HOME% GOTO SET_LIBRARY_PATH
+
+
+ECHO ERROR: The specified JAVA_HOME does not exist!
+ECHO.
+GOTO EXIT_PROCESS
+
+
+REM
+REM Setup the appropriate library path environment variable
+REM based upon the platform (WINNT)
+REM
+
+:SET_LIBRARY_PATH
+SET PATH=%JAVA_HOME%\bin;%JAVA_HOME%\lib;%PATH%
+
+
+REM
+REM Set TARGET - identify the complete path to the new classes target directory
+REM
+
+SET TARGET=..\classes
+
+
+REM
+REM Create the new classes target directory (if it does not already exist)
+REM
+
+IF EXIST %TARGET% goto COMPILE_CLASSES
+MKDIR %TARGET%
+
+
+REM
+REM Compile 41ToTxt - create "CMS41LdifParser.class" and "Main.class"
+REM
+
+:COMPILE_CLASSES
+%JAVA_HOME%\bin\javac.exe -d %TARGET% -classpath %JAVA_HOME%\lib\classes.zip;%SERVER_ROOT%\bin\cert\jars\certsrv.jar;%SERVER_ROOT%\bin\cert\jars\jss.jar;%SERVER_ROOT%\bin\cert\jars\jssjdk12.jar Main.java
+
+
+:EXIT_PROCESS
+
+
+ENDLOCAL
+