File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ Use these optional command line options as needed:
5454 ./init.sh MyAnalysisProjectName
5555 ` ` `
5656
57+ - Change into the analysis directory.
58+
59+ ` ` ` shell
60+ cd ./temp/MyAnalysisProjectName
61+ ` ` `
62+
5763# ## 2. Prepare the code to be analyzed
5864
5965- Move the artifacts (e.g. Java jars json files) you want to analyze into the ` artifacts` directory.
Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ if [ -z "${NEO4J_INITIAL_PASSWORD}" ]; then
3131 exit 1
3232fi
3333
34+ createForwardingScript () {
35+ local originalScript=" ${1} "
36+ local scriptName; scriptName=$( basename " $originalScript " )
37+
38+ cp -n " ${originalScript} " .
39+ echo " #!/usr/bin/env bash" > " ./${scriptName} "
40+ # shellcheck disable=SC2016
41+ echo " ${originalScript} \"\$ {@}\" " >> " ./${scriptName} "
42+ }
43+
3444# Create the temporary directory for all analysis projects if it hadn't been created yet.
3545mkdir -p ./temp
3646cd ./temp
@@ -45,9 +55,9 @@ mkdir -p "./${ARTIFACTS_DIRECTORY}"
4555# Create the source directory inside the analysis directory for source code projects/repositories if it hadn't been created yet.
4656mkdir -p " ./${SOURCE_DIRECTORY} "
4757
48- # Create symbolic links to the most common scripts for code analysis.
49- ln -s " ./../../scripts/analysis/analyze.sh" .
50- ln -s " ./../../scripts/startNeo4j.sh" .
51- ln -s " ./../../scripts/stopNeo4j.sh" .
58+ # Create forwarding scripts for the most important commands
59+ createForwardingScript " ./../../scripts/analysis/analyze.sh"
60+ createForwardingScript " ./../../scripts/startNeo4j.sh"
61+ createForwardingScript " ./../../scripts/stopNeo4j.sh"
5262
5363echo " init: Successfully initialized analysis project ${analysisName} " >&2
You can’t perform that action at this time.
0 commit comments