HIGUCHI Yuta
Committed by Gerrit Code Review

Prune first to speed up utility function 'o'

Change-Id: I22c46a0a8b690a58c18186aa85c0491e470c3c9b
...@@ -41,8 +41,8 @@ export ONOS_SCENARIOS=$ONOS_ROOT/tools/test/scenarios ...@@ -41,8 +41,8 @@ export ONOS_SCENARIOS=$ONOS_ROOT/tools/test/scenarios
41 # Convenience utility to warp to various ONOS source projects 41 # Convenience utility to warp to various ONOS source projects
42 # e.g. 'o api', 'o dev', 'o' 42 # e.g. 'o api', 'o dev', 'o'
43 function o { 43 function o {
44 - cd $(find $ONOS_ROOT/ -type d | egrep -v '\.git|target|gen-src' | \ 44 + cd $(find $ONOS_ROOT/ -type d -and \( -name '.git' -o -name 'target' -o -name 'gen-src' -o -name 'src' \) -prune -o -type d | \
45 - egrep "${1:-$ONOS_ROOT}" | egrep -v "$ONOS_ROOT/.+/src/" | head -n 1) 45 + egrep "${1:-$ONOS_ROOT}" | head -n 1)
46 } 46 }
47 47
48 # Short-hand for 'mvn clean install' for us lazy folk 48 # Short-hand for 'mvn clean install' for us lazy folk
......