-
Notifications
You must be signed in to change notification settings - Fork 2
/
wss-runner.sh
47 lines (41 loc) · 1.92 KB
/
wss-runner.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
echo ""
LOCAL_INSTALL_FILE="install-commands.sh"
echo "*******************************************************************************************************************"
echo " Start Executing Commands File"
echo "*******************************************************************************************************************"
echo ""
if [[ -f ${INSTALL_COMMANDS} ]]
then
echo "Executing file: ${INSTALL_COMMANDS}"
echo ""
chmod +x ${INSTALL_COMMANDS}
./${INSTALL_COMMANDS}
else
echo "Couldn't find file ${INSTALL_COMMANDS}, Extra commands will not run before scan"
fi
echo ""
echo "*******************************************************************************************************************"
echo " Finish Executing Commands File"
echo "*******************************************************************************************************************"
echo ""
echo ""
echo "*******************************************************************************************************************"
echo " Start Running WhiteSource Unified Agent "
echo "*******************************************************************************************************************"
echo ""
PROJECT_DIRECTORY=${PROJECT_DIRECTORY:="."}
API_KEY=${API_KEY}
CONFIG_FILE=${CONFIG_FILE:="wss-unified-agent.config"}
pwd
ls
ls ${PROJECT_DIRECTORY}
if [[ -z "${API_KEY}" ]]; then
/wss-scan/run_latest_jar.sh -c "${CONFIG_FILE}" -d "${PROJECT_DIRECTORY}"
else
/wss-scan/run_latest_jar.sh -apiKey "${API_KEY}" -c "${CONFIG_FILE}" -d "${PROJECT_DIRECTORY}"
fi
echo ""
echo "*******************************************************************************************************************"
echo " Finish Running WhiteSource Unified Agent "
echo "*******************************************************************************************************************"