summaryrefslogtreecommitdiffstats
path: root/Monitoring/MonitoringTool/PacketTracking/scripts/netview.sh
diff options
context:
space:
mode:
authorpikusa <pikusa@man.poznan.pl>2013-04-03 13:18:17 (GMT)
committer pikusa <pikusa@man.poznan.pl>2013-04-03 13:18:17 (GMT)
commit2f2a3a129c91de540e66c3bfbe30b0df1942cd4b (patch)
tree2d313cdf0068af368d4de6067d676be16f6a6464 /Monitoring/MonitoringTool/PacketTracking/scripts/netview.sh
parentff8aa232b071a9b54dff833714a870fd0aec0b30 (diff)
downloadnovi-public-2f2a3a129c91de540e66c3bfbe30b0df1942cd4b.zip
novi-public-2f2a3a129c91de540e66c3bfbe30b0df1942cd4b.tar.gz
novi-public-2f2a3a129c91de540e66c3bfbe30b0df1942cd4b.tar.bz2
project commit and dir tree change
Diffstat (limited to 'Monitoring/MonitoringTool/PacketTracking/scripts/netview.sh')
-rw-r--r--Monitoring/MonitoringTool/PacketTracking/scripts/netview.sh108
1 files changed, 108 insertions, 0 deletions
diff --git a/Monitoring/MonitoringTool/PacketTracking/scripts/netview.sh b/Monitoring/MonitoringTool/PacketTracking/scripts/netview.sh
new file mode 100644
index 0000000..8612aac
--- /dev/null
+++ b/Monitoring/MonitoringTool/PacketTracking/scripts/netview.sh
@@ -0,0 +1,108 @@
+#!/bin/sh
+# NetView helper script
+#
+CMD=$1
+
+#
+# Usage
+#
+usage () {
+cat <<EOT
+#
+# NetView maven helper script
+#
+
+USAGE: netview.sh {clean|build|start}
+
+EOT
+}
+#
+# Clean all
+#
+cleanall() {
+ save_dir=`pwd`
+ cd $buildhome/pt-api
+ if [ -r "./pom.xml" ]; then
+ echo "# cleaning pt-api # "
+ mvn clean
+ echo "# cleaning NetView"
+ cd $buildhome/netview
+ mvn clean
+ else
+ curr_dir=`pwd`
+ cat<<EOT
+ERROR: Could not find $curr_dir/pom.xml
+ Please checkout pt-api in the indicated location and try again.
+
+EOT
+ fi
+ cd $save_dir
+
+
+
+}
+#
+# Build all dependencies using maven
+#
+buildall () {
+ save_dir=`pwd`
+ cd $buildhome/netview
+ if [ -r "./pom.xml" ]; then
+ echo "#####################"
+ echo "# Building PT-API #"
+ echo "#####################"
+ cd $buildhome/pt-api
+ mvn compile install -Dmaven.test.skip=true
+ echo ""
+ echo "####################"
+ echo "# Building NetView #"
+ echo "####################"
+ cd $buildhome/netview
+ mvn compile exec:exec -Dmaven.test.skip=true
+ else
+ curr_dir=`pwd`
+ cat<<EOT
+ERROR: Could not find $curr_dir/pom.xml
+ Please checkout netview in the indicated location and try again.
+
+EOT
+ fi
+ cd $save_dir
+
+}
+#
+# Start NetView
+#
+start (){
+ if [ -r $buildhome/netview/.m2classpath ]; then
+ echo "Starting NetView"
+ cd $buildhome/netview
+ ../scripts/m2run de.fhg.fokus.net.netview.control.MainController
+ else
+ cat <<EOT
+ERROR: project not built. Assure you have mvn in the path and
+ run "netview.sh build"
+EOT
+ fi
+}
+
+
+#
+# MAIN
+#
+cd `dirname $0`/..;
+buildhome=$PWD
+
+case $CMD in
+ build)
+ buildall
+ ;;
+ clean)
+ cleanall
+ ;;
+ start)
+ start
+ ;;
+ *)
+ usage
+esac