11#! /bin/bash
22# OGO Development Tasks
33# Usage: ./tasks.sh [command]
4- # Commands: check_deps, install_deps, compile_ogo, install_ogo, test_ogo, exec_ogo, format_ogo_java, end_to_end
54
65function check_deps() {
76 # Check dependencies for this project.
@@ -65,17 +64,17 @@ function install_deps() {
6564 return 0
6665}
6766
68- function compile_ogo () {
67+ function compile () {
6968 # Build the project.
7069 (
7170 mvn clean compile -Dagent.build.skip=false properties:write-project-properties || \
7271 { echo " could not compile ogo" ; return 1; }
7372 )
7473}
7574
76- function install_ogo () {
75+ function install () {
7776 # Build the project.
78- compile_ogo
77+ compile
7978 (
8079 export LD_LIBRARY_PATH=" ./src/main/c/build"
8180 export JAVA_TOOL_OPTIONS=" -Djava.util.logging.config.file=./src/main/resources/logging.properties"
@@ -84,36 +83,36 @@ function install_ogo() {
8483 )
8584}
8685
87- function test_ogo () {
86+ function tests () {
8887 check_deps || \
8988 { echo " Dependencies not satisfied. Please install with: ./tasks.sh install_deps" ; return 1; }
90- echo " Please make sure you have ran ./tasks.sh compile_ogo "
89+ echo " Please make sure you have ran ./tasks.sh compile "
9190 (
9291 export LD_LIBRARY_PATH=" ./src/main/c/build"
9392 export JAVA_TOOL_OPTIONS=" -Djdk.attach.allowAttachSelf=true -Djava.security.manager=allow -Djava.util.logging.config.file=./src/main/resources/logging.properties"
9493 mvn -e exec:exec@serverStart test -DargLine=" -agentlib:ogoAgent"
9594 )
9695}
9796
98- function exec_ogo () {
97+ function execs () {
9998 check_deps || \
10099 { echo " Dependencies not satisfied. Please install with: ./tasks.sh install_deps" ; return 1; }
101- echo " Please make sure you have ran ./tasks.sh compile_ogo "
100+ echo " Please make sure you have ran ./tasks.sh compile "
102101 (
103102 export LD_LIBRARY_PATH=" ./src/main/c/build"
104103 export JAVA_TOOL_OPTIONS=" -Djava.util.logging.config.file=./src/main/resources/logging.properties"
105104 mvn -e exec:exec@main
106105 )
107106}
108107
109- function format_ogo_java () {
108+ function format () {
110109 mvn fmt:format
111110}
112111
113112function end_to_end() {
114113 check_deps || \
115114 { echo " deps not satisfied" ; exit 1; }
116- install_ogo || \
115+ install || \
117116 { echo " could not install ogo" ; exit 1; }
118117}
119118
0 commit comments