summaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
authorMaurice Laveaux <m.laveaux@student.tue.nl>2014-04-25 12:55:46 +0200
committerMaurice Laveaux <m.laveaux@student.tue.nl>2014-04-25 12:55:46 +0200
commitd03f2bca4a7d33b1347db487aa588a5d163e5615 (patch)
tree58e4df0c9f025b69898ad84a998bb8814b209677 /run.sh
parentcc55914d61978b46ec8e3673c4b37fdc3b392e48 (diff)
downloadTwitterDataAnalytics-d03f2bca4a7d33b1347db487aa588a5d163e5615.tar.gz
Merged and resolved conflicts.
* No functionality of Command is currently used.
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/run.sh b/run.sh
new file mode 100755
index 0000000..3a92d1f
--- /dev/null
+++ b/run.sh
@@ -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" "$@"