@@ -50,7 +50,7 @@ LOG_GROUP_END=${LOG_GROUP_END:-"::endgroup::"} # Prefix to end a log group. Defa
5050
5151# Function to display script usage
5252usage () {
53- echo " Usage: $0 [--report <All (default), Csv, Jupyter, Python, Visualization...>] [--profile <Default, Neo4jv5, Neo4jv4,...>] [--domain <domain-name>] [--explore]"
53+ echo " Usage: $0 [--report <All (default), Csv, Jupyter, Python, Visualization...>] [--profile <Default, Neo4jv5, Neo4jv4,...>] [--domain <domain-name>] [--explore] [--keep-running] "
5454 exit 1
5555}
5656
@@ -59,6 +59,7 @@ analysisReportCompilation="All"
5959settingsProfile=" Default"
6060selectedAnalysisDomain=" "
6161exploreMode=false
62+ keepRunning=false
6263
6364# Function to check if a parameter value is missing (either empty or another option starting with --)
6465is_missing_value_parameter () {
@@ -92,6 +93,10 @@ while [[ $# -gt 0 ]]; do
9293 exploreMode=true
9394 shift
9495 ;;
96+ --keep-running)
97+ keepRunning=true
98+ shift
99+ ;;
95100 --domain)
96101 if is_missing_value_parameter " $1 " " $2 " ; then
97102 echo " analyze: Error: --domain requires a value."
@@ -141,6 +146,12 @@ echo "analyze: analysisReportCompilation=${analysisReportCompilation}"
141146echo " analyze: settingsProfile=${settingsProfile} "
142147echo " analyze: selectedAnalysisDomain=${selectedAnalysisDomain} "
143148echo " analyze: exploreMode=${exploreMode} "
149+ echo " analyze: keepRunning=${keepRunning} "
150+
151+ # Print warning if --explore and --keep-running are used together
152+ if ${exploreMode} && ${keepRunning} ; then
153+ echo " analyze: Warning: --explore implies --keep-running. The --keep-running option is redundant."
154+ fi
144155
145156# # Get this "scripts/analysis" directory if not already set
146157# Even if $BASH_SOURCE is made for Bourne-like shells it is also supported by others and therefore here the preferred solution.
217228# ########################
218229source " ${REPORT_COMPILATION_SCRIPT} "
219230
220- # Stop Neo4j at the end
231+ # Stop Neo4j at the end (unless --keep-running is set)
221232echo " ${LOG_GROUP_START} Finishing Analysis"
222- source " ${SCRIPTS_DIR} /stopNeo4j.sh"
233+ if ${keepRunning} ; then
234+ echo " analyze: Neo4j will keep running (--keep-running is set)."
235+ else
236+ source " ${SCRIPTS_DIR} /stopNeo4j.sh"
237+ fi
223238echo " ${LOG_GROUP_END} "
0 commit comments