Thomas Vachuska | 3f79e2a | 2016-08-08 16:07:50 -0700 | [diff] [blame] | 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 |