blob: e07f1463448949fc1fd6de1e8c24f1b490d76f31 [file] [log] [blame]
Thomas Vachuska3f79e2a2016-08-08 16:07:50 -07001#!/bin/bash
2#-------------------------------------------------------------------------------
3# Component Dependency Mapper
4#-------------------------------------------------------------------------------
5
6VER=${CDVUE_VERSION:-1.0}
7JAR=~/.m2/repository/org/onosproject/cdvue/$VER/cdvue-$VER.jar
8
9# Download the cdvue binary if needed
10if [ ! -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"
16fi
17
18# Assume default project to be the base-name of the argument or of current dir
19name=$(basename ${1:-$PWD})
20
21# Now run the Component Dependency Viewer jar on the catalog
22java -jar "${JAR}" $1 && mv mapper.html $name.html && open $name.html