From 3f79e2a100678dcbcae2d0f23da3d11b94534e91 Mon Sep 17 00:00:00 2001 From: Thomas Vachuska Date: Mon, 8 Aug 2016 16:07:50 -0700 Subject: [PATCH] Adding cdvue tool to allow developers to run it without building the binaries themselves. Change-Id: I1582b1ca9d55a9a7debe50d49b1588b9c9a63fb6 --- tools/dev/bin/cdvue | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 tools/dev/bin/cdvue diff --git a/tools/dev/bin/cdvue b/tools/dev/bin/cdvue new file mode 100755 index 0000000000..e07f146344 --- /dev/null +++ b/tools/dev/bin/cdvue @@ -0,0 +1,22 @@ +#!/bin/bash +#------------------------------------------------------------------------------- +# Component Dependency Mapper +#------------------------------------------------------------------------------- + +VER=${CDVUE_VERSION:-1.0} +JAR=~/.m2/repository/org/onosproject/cdvue/$VER/cdvue-$VER.jar + +# Download the cdvue binary if needed +if [ ! -f $JAR ]; then + printf "Downloading cdvue binary..." + aux=/tmp/stc-$$.log + mvn dependency:get -Dartifact=org.onosproject:cdvue:$VER -Dtransitive=false -B >$aux || fgrep '[ERROR]' $aux + rm -f $aux + [ -f $JAR ] && printf "Done.\n" +fi + +# Assume default project to be the base-name of the argument or of current dir +name=$(basename ${1:-$PWD}) + +# Now run the Component Dependency Viewer jar on the catalog +java -jar "${JAR}" $1 && mv mapper.html $name.html && open $name.html