Skip to content

Commit c85c7d6

Browse files
author
Owen Jones
committed
Allow OUTPUT_DIR to be overridden
If OUTPUT_DIR doesn't already exist then it will be set to $SECURITY_SCANNER_HOME/GENUINE
1 parent 59eaa71 commit c85c7d6

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

benchmarks/GENUINE/Alfresco.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ set -e
4242
SCRIPT_WORKING_DIR=$(pwd)
4343
REPO_DIR=$SCRIPT_WORKING_DIR/Alfresco
4444
DEPLOY_DIR=$REPO_DIR/__dist__
45-
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
45+
if [ -z "$OUTPUT_DIR" ]; then
46+
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
47+
fi
4648

4749
if [[ ! -d $REPO_DIR ]]; then
4850
# The next two statements are commented out, because they access the old

benchmarks/GENUINE/CiteSeerX.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ SCRIPT_WORKING_DIR=$(pwd)
1212
REPO_DIR=$SCRIPT_WORKING_DIR/CiteSeerX
1313
DEPLOY_DIR=$REPO_DIR
1414
FILES_DIR=$SCRIPT_WORKING_DIR/CiteSeerX_files
15-
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
15+
if [ -z "$OUTPUT_DIR" ]; then
16+
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
17+
fi
1618

1719
if [[ ! -d $REPO_DIR ]]; then
1820
# Clone repo and check out a commit which builds (head of master)

benchmarks/GENUINE/DSpace.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ SCRIPT_WORKING_DIR=$(pwd)
1212
REPO_DIR=$SCRIPT_WORKING_DIR/DSpace
1313
DEPLOY_DIR=$REPO_DIR
1414
FILES_DIR=$SCRIPT_WORKING_DIR/DSpace_files
15-
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
15+
if [ -z "$OUTPUT_DIR" ]; then
16+
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
17+
fi
1618

1719
if [[ ! -d $REPO_DIR ]]; then
1820
# 1. Open a terminal in the directory of this readme file and clone DSpace:

benchmarks/GENUINE/Ginco.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ SCRIPT_WORKING_DIR=$(pwd)
1212
REPO_DIR=$SCRIPT_WORKING_DIR/Ginco
1313
DEPLOY_DIR=$REPO_DIR/__dist__
1414
FILES_DIR=$SCRIPT_WORKING_DIR/Ginco_files
15-
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
15+
if [ -z "$OUTPUT_DIR" ]; then
16+
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
17+
fi
1618

1719
if [[ ! -d $REPO_DIR ]]; then
1820
mkdir -p $REPO_DIR

benchmarks/GENUINE/Sakai.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ SCRIPT_WORKING_DIR=$(pwd)
1212
REPO_DIR=$SCRIPT_WORKING_DIR/Sakai
1313
DEPLOY_DIR=$REPO_DIR/__dist__
1414
FILES_DIR=$SCRIPT_WORKING_DIR/Sakai_files
15-
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
16-
15+
if [ -z "$OUTPUT_DIR" ]; then
16+
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
17+
fi
1718

1819
if [[ ! -d $REPO_DIR ]]; then
1920
# Clone repo and check out a commit which builds (head of master)

benchmarks/GENUINE/WebGoat.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ REPO_DIR=$SCRIPT_WORKING_DIR/WebGoat
1616
DEPLOY_DIR=$REPO_DIR
1717
FILES_DIR=$SCRIPT_WORKING_DIR/WebGoat_files
1818
MODELS_LIB_DIR=$SCRIPT_WORKING_DIR/../LIBRARIES/models
19-
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
19+
if [ -z "$OUTPUT_DIR" ]; then
20+
OUTPUT_DIR=$SECURITY_SCANNER_HOME/GENUINE
21+
fi
2022

2123
if [[ ! -d $REPO_DIR ]]; then
2224
# 1. git https://github.com/WebGoat/WebGoat.git

0 commit comments

Comments
 (0)