Committed by
Gerrit Code Review
Adding cdvue tool to allow developers to run it without building the binaries themselves.
Change-Id: I1582b1ca9d55a9a7debe50d49b1588b9c9a63fb6
Showing
1 changed file
with
22 additions
and
0 deletions
tools/dev/bin/cdvue
0 → 100755
| 1 | +#!/bin/bash | ||
| 2 | +#------------------------------------------------------------------------------- | ||
| 3 | +# Component Dependency Mapper | ||
| 4 | +#------------------------------------------------------------------------------- | ||
| 5 | + | ||
| 6 | +VER=${CDVUE_VERSION:-1.0} | ||
| 7 | +JAR=~/.m2/repository/org/onosproject/cdvue/$VER/cdvue-$VER.jar | ||
| 8 | + | ||
| 9 | +# Download the cdvue binary if needed | ||
| 10 | +if [ ! -f $JAR ]; then | ||
| 11 | + printf "Downloading cdvue binary..." | ||
| 12 | + aux=/tmp/stc-$$.log | ||
| 13 | + mvn dependency:get -Dartifact=org.onosproject:cdvue:$VER -Dtransitive=false -B >$aux || fgrep '[ERROR]' $aux | ||
| 14 | + rm -f $aux | ||
| 15 | + [ -f $JAR ] && printf "Done.\n" | ||
| 16 | +fi | ||
| 17 | + | ||
| 18 | +# Assume default project to be the base-name of the argument or of current dir | ||
| 19 | +name=$(basename ${1:-$PWD}) | ||
| 20 | + | ||
| 21 | +# Now run the Component Dependency Viewer jar on the catalog | ||
| 22 | +java -jar "${JAR}" $1 && mv mapper.html $name.html && open $name.html |
-
Please register or login to post a comment