blob: 2fe018888afc0117fe30cbcb815bf2b7d6cbf769 [file] [log] [blame]
tom1cd74ae2014-10-01 14:58:32 -07001#!/bin/bash
2#------------------------------------------------------------------------------
3# Selectively builds only those projects that contained modified Java files.
4#------------------------------------------------------------------------------
5
6projects=$(find $ONOS_ROOT -name '*.java' \
7 -not -path '*/openflowj/*' -and -not -path '.git/*' \
8 -exec $ONOS_ROOT/tools/dev/bin/onos-build-selective-hook {} \; | \
9 sort -u | sed "s:$ONOS_ROOT::g" | tr '\n' ',' | \
10 sed 's:/,:,:g;s:,/:,:g;s:^/::g;s:,$::g')
11
12[ -n "$projects" ] && cd $ONOS_ROOT && mvn --projects $projects ${@:-clean install}