Skip to content

Commit da97d62

Browse files
committed
corrected usage printout, added shell scripts for QC tool
1 parent 85825bd commit da97d62

File tree

4 files changed

+69
-2
lines changed

4 files changed

+69
-2
lines changed

core/src/main/bin/mmd_qc_tool.bat

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@ECHO OFF
2+
3+
:: -======================-
4+
:: User configurable values
5+
:: -======================-
6+
7+
SET INSTALLDIR=%~dp0%
8+
9+
::------------------------------------------------------------------
10+
:: You can adjust the Java minimum and maximum heap space here.
11+
:: Just change the Xms and Xmx options. Space is given in megabyte.
12+
:: '-Xms64M' sets the minimum heap space to 64 megabytes
13+
:: '-Xmx512M' sets the maximum heap space to 512 megabytes
14+
::------------------------------------------------------------------
15+
SET JAVA_OPTS=-Xms64M -Xmx8192M
16+
17+
18+
:: -======================-
19+
:: Other values
20+
:: -======================-
21+
22+
SET JAVAEXE=java.exe
23+
SET LIBDIR=%INSTALLDIR%\lib
24+
SET OLD_CLASSPATH=%CLASSPATH%
25+
26+
SET CLASSPATH=%LIBDIR%\*;%LIBDIR%
27+
28+
CALL "%JAVAEXE%" %JAVA_OPTS% -classpath "%CLASSPATH%" com.bc.fiduceo.qc.MmdQCToolMain %*
29+
30+
SET CLASSPATH=%OLD_CLASSPATH%

core/src/main/bin/mmd_qc_tool.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
# -======================-
4+
# User configurable values
5+
# -======================-
6+
7+
export INSTALLDIR="$(dirname $0)"
8+
9+
#------------------------------------------------------------------
10+
# You can adjust the Java minimum and maximum heap space here.
11+
# Just change the Xms and Xmx options. Space is given in megabyte.
12+
# '-Xms64M' sets the minimum heap space to 64 megabytes
13+
# '-Xmx512M' sets the maximum heap space to 512 megabytes
14+
#------------------------------------------------------------------
15+
export JAVA_OPTS="-Xmx8192M"
16+
17+
# check if we`re running on CEMS, if so take the java executable externally defined
18+
if [ -z "${MMS_JAVA_EXEC}" ]; then
19+
# not set, use what we have on the system
20+
export JAVA_EXE="$(which java)"
21+
else
22+
# yes, we seem to be on CEMS
23+
export JAVA_EXE="$MMS_JAVA_EXEC"
24+
fi
25+
26+
27+
# -======================-
28+
# Other values
29+
# -======================-
30+
31+
export LIBDIR="$INSTALLDIR"/lib
32+
export OLD_CLASSPATH="$CLASSPATH"
33+
CLASSPATH="$LIBDIR/*:$LIBDIR"
34+
35+
"$JAVA_EXE" "$JAVA_OPTS" -classpath "$CLASSPATH" com.bc.fiduceo.qc.MmdQCToolMain "$@"
36+
37+
export CLASSPATH="$OLD_CLASSPATH"

core/src/main/java/com/bc/fiduceo/qc/MmdQCTool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static void printUsageTo(OutputStream outputStream) {
210210
writer.write(ls + ls);
211211

212212
final HelpFormatter helpFormatter = new HelpFormatter();
213-
helpFormatter.printHelp(writer, 120, "matchup-tool <options>", "Valid options are:",
213+
helpFormatter.printHelp(writer, 120, "mmd-qc-tool <options>", "Valid options are:",
214214
getOptions(), 3, 3, "");
215215

216216
writer.flush();

core/src/test/java/com/bc/fiduceo/qc/MmdQCToolTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public void testPrintUsageTo() {
1919

2020
assertEquals("mmd-qc-tool version 1.5.8" + ls +
2121
ls +
22-
"usage: matchup-tool <options>" + ls +
22+
"usage: mmd-qc-tool <options>" + ls +
2323
"Valid options are:" + ls +
2424
" -h,--help Prints the tool usage." + ls +
2525
" -i,--input <arg> Defines the MMD input directory." + ls +

0 commit comments

Comments
 (0)