diff options
author | Maurice Laveaux <m.laveaux@student.tue.nl> | 2014-04-25 12:55:46 +0200 |
---|---|---|
committer | Maurice Laveaux <m.laveaux@student.tue.nl> | 2014-04-25 12:55:46 +0200 |
commit | d03f2bca4a7d33b1347db487aa588a5d163e5615 (patch) | |
tree | 58e4df0c9f025b69898ad84a998bb8814b209677 /run.sh | |
parent | cc55914d61978b46ec8e3673c4b37fdc3b392e48 (diff) | |
download | TwitterDataAnalytics-d03f2bca4a7d33b1347db487aa588a5d163e5615.tar.gz |
Merged and resolved conflicts.
* No functionality of Command is currently used.
Diffstat (limited to 'run.sh')
-rwxr-xr-x | run.sh | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -0,0 +1,31 @@ +#!/bin/sh +# You should build the jar file with `ant jar`, then run this script + +if [ -z "$CA" ]; then + CA=/tmp/cap/.keystore +fi + +# Proxy parameters from +# http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#Customization +proxy_options() { + # Do not add proxy options if there is no CA or no_proxy env is set + if [ -z "$CA" ] || [ -n "$no_proxy" ]; then + return + fi + + echo -Dhttps.proxyHost=localhost + echo -Dhttps.proxyPort=8008 + echo -Djavax.net.ssl.trustStore=$CA +} + +# Exit on errors +set -e + +# Change dir to project +cd "$(dirname "$(readlink -f "$0")")" + +jar=dist/TwitterDataAnalytics.jar +# Build jar if missing +[ -e "$jar" ] || ant jar + +java $(proxy_options) -jar "$jar" "$@" |