diff options
author | Kajur, Harish (vk250x) <vk250x@att.com> | 2020-02-29 22:17:05 -0500 |
---|---|---|
committer | jimmy <jf2512@att.com> | 2020-03-03 13:20:06 -0500 |
commit | 3a27813b663c34df52b2b1b50df7f0754dcfe134 (patch) | |
tree | 1f962778cd649286f70ae7ec8dbc5d868a668a7b /aai-resources/src/main/scripts/common_functions.sh | |
parent | 50315fe106b88e0cd556b8b6fab1dbdd4c9856a4 (diff) |
Update resources to use aai-common changes
Issue-ID: AAI-2750
Change-Id: I33ea2b3d7b4b706edc59c3d45c9957d05effd306
Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
Diffstat (limited to 'aai-resources/src/main/scripts/common_functions.sh')
-rw-r--r-- | aai-resources/src/main/scripts/common_functions.sh | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/aai-resources/src/main/scripts/common_functions.sh b/aai-resources/src/main/scripts/common_functions.sh index e99746d..14358d9 100644 --- a/aai-resources/src/main/scripts/common_functions.sh +++ b/aai-resources/src/main/scripts/common_functions.sh @@ -60,16 +60,19 @@ execute_spring_jar(){ JAVA_OPTS="$JAVA_OPTS -Dlogback.configurationFile=${logbackFile}"; export SOURCE_NAME=$(grep '^schema.source.name=' ${PROJECT_HOME}/resources/application.properties | cut -d"=" -f2-); - # Needed for the schema ingest library beans - eval $(grep '^schema\.' ${PROJECT_HOME}/resources/application.properties | \ - sed 's/^\(.*\)$/JAVA_OPTS="$JAVA_OPTS -D\1"/g' | \ - sed 's/${server.local.startpath}/${PROJECT_HOME}\/resources/g'| \ - sed 's/${schema.source.name}/'${SOURCE_NAME}'/g'\ - ) - - JAVA_OPTS="${JAVA_OPTS} ${JAVA_POST_OPTS}"; - - ${JAVA_HOME}/bin/java ${JVM_OPTS} ${JAVA_OPTS} -jar ${EXECUTABLE_JAR} "$@" + # Needed for the schema ingest library beans + eval $(egrep '^(schema|server)\.' ${PROJECT_HOME}/resources/application.properties | \ + sed 's/^\(.*\)$/JAVA_OPTS="$JAVA_OPTS -D\1"/g' | \ + sed 's/${server.local.startpath}/${PROJECT_HOME}\/resources/g'| \ + sed 's/${schema.source.name}/'${SOURCE_NAME}'/g'\ + ) + + JAVA_OPTS="${JAVA_OPTS} ${JAVA_POST_OPTS}"; + + "${JAVA_HOME}/bin/java" ${JVM_OPTS} ${JAVA_OPTS} -jar ${EXECUTABLE_JAR} "$@" || { + echo "Failed to run the tool $0 successfully"; + exit 1; + } } # Prints the start date and the script that the user called |