# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
# This script downloads wss-unified-agent-<version>.jar and uses it to perform
# a scan on the code whithin a repo based on the wss-unified-agent.config provided.
# This script downloads wss-unified-agent-<version>.jar and uses it to perform
# a scan on the code whithin a repo based on the wss-unified-agent.config provided.
echo "---> whitesource-unified-agent-cli.sh"
jar_location="/tmp/wss-unified-agent-${WSS_UNIFIED_AGENT_VERSION}.jar"
wss_unified_agent_url="https://s3.amazonaws.com/unified-agent/wss-unified-agent-${WSS_UNIFIED_AGENT_VERSION}.jar"
echo "---> whitesource-unified-agent-cli.sh"
jar_location="/tmp/wss-unified-agent-${WSS_UNIFIED_AGENT_VERSION}.jar"
wss_unified_agent_url="https://s3.amazonaws.com/unified-agent/wss-unified-agent-${WSS_UNIFIED_AGENT_VERSION}.jar"
-java -jar ${jar_location} -c wss-unified-agent.config \
- -product ${WSS_PRODUCT_NAME} -project ${WSS_PROJECT_NAME} \
- -projectVersion ${GERRIT_BRANCH} ${WSS_UNIFIED_AGENT_OPTIONS:-}
-rm ${jar_location}
+java -jar "${jar_location}" -c wss-unified-agent.config \
+ -product "${WSS_PRODUCT_NAME}" -project "${WSS_PROJECT_NAME}" \
+ -projectVersion "${GERRIT_BRANCH}" ${WSS_UNIFIED_AGENT_OPTIONS:-}
+rm "${jar_location}"