4 JAVA=$JAVA_HOME/bin/java
5 LOGS=-Djava.util.logging.SimpleFormatter.format='%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$-6s %5$s%6$s%n'
9 if [ "$COMMAND" == "compile" ]; then
11 $JAVA_HOME/bin/javac -Xdiags:verbose -Xlint:unchecked \
12 -cp lib:lib/\* -d lib src/org/evergreen_ils/hatch/*.java
14 elif [ "$COMMAND" == "test" ]; then
16 # 1. Run TestHatch in (default) send mode, which emits JSON requests
17 # 2. Run Hatch and process messages emitted from #1.
18 # 3. Run TestHatch in receive mode to log the responses.
20 $JAVA "$LOGS" -cp lib:lib/\* org.evergreen_ils.hatch.TestHatch \
21 | $JAVA "$LOGS" -cp lib:lib/\* org.evergreen_ils.hatch.Hatch \
22 | $JAVA "$LOGS" -cp lib:lib/\* org.evergreen_ils.hatch.TestHatch receive
24 elif [ "$COMMAND" == "run" ]; then
27 $JAVA "$LOGS" -cp lib:lib/\* org.evergreen_ils.hatch.Hatch
31 echo "Usage: $0 [compile|test|run]";