Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next
Showing
1 changed file
with
41 additions
and
0 deletions
tools/dev/bash_profile
0 → 100644
1 | +#!/bin/bash | ||
2 | +# ONOS developer BASH profile conveniences | ||
3 | + | ||
4 | +# Root of the ONOS source tree | ||
5 | +export ONOS_ROOT=${ONOS_ROOT:-~/onos-next} | ||
6 | + | ||
7 | +# Setup some environmental context for developers | ||
8 | +export JAVA_HOME=$(/usr/libexec/java_home) | ||
9 | +export MAVEN=${MAVEN:-~/Applications/apache-maven-3.2.2} | ||
10 | +export KARAF=${KARAF:-~/Applications/apache-karaf-3.0.1} | ||
11 | +export KARAF_LOG=$KARAF/data/log/karaf.log | ||
12 | + | ||
13 | +# Setup a path | ||
14 | +export PS=":" | ||
15 | +export PATH="$PATH:$ONOS_ROOT/tools/dev;$ONOS_ROOT/tools/package" | ||
16 | +export PATH="$PATH:$MAVEN/bin:$KARAF/bin" | ||
17 | +export PATH="$PATH:." | ||
18 | + | ||
19 | +# Convenience utility to warp to various ONOS source projects | ||
20 | +# e.g. 'o api', 'o dev', 'o' | ||
21 | +function o { | ||
22 | + cd $(find $ONOS_ROOT/ -type d | egrep -v '.git|target|src' | \ | ||
23 | + egrep "${1:-$ONOS_ROOT}" | head -n 1) | ||
24 | +} | ||
25 | + | ||
26 | +# Short-hand for 'mvn clean install' for us lazy folk | ||
27 | +alias mci='mvn clean install' | ||
28 | + | ||
29 | +# Short-hand for ONOS build from the top of the source tree. | ||
30 | +alias ob='o && mvn clean install javadoc:aggregate' | ||
31 | + | ||
32 | +# Short-hand for tailing the ONOS (karaf) log | ||
33 | +alias tl='$ONOS_ROOT/tools/dev/watchLog' | ||
34 | +alias tlo='tl | grep --colour=always org.onlab' | ||
35 | + | ||
36 | +# Pretty-print JSON output | ||
37 | +alias pp='python -m json.tool' | ||
38 | + | ||
39 | +# Short-hand to launch API docs and sample topology viewer GUI | ||
40 | +alias docs='open $ONOS_ROOT/target/site/apidocs/index.html' | ||
41 | +alias gui='open http://localhost:8181/onos/tvue' |
-
Please register or login to post a comment