blob: 32b75e71385bdddadb6fd081169a1f2871c3c48c [file] [log] [blame]
tom1cd74ae2014-10-01 14:58:32 -07001#!/bin/bash
Pavlin Radoslavov91413792014-10-15 11:00:32 -07002# ----------------------------------------------------------------------------
tom1cd74ae2014-10-01 14:58:32 -07003# Selectively builds only those projects that contained modified Java files.
Pavlin Radoslavov91413792014-10-15 11:00:32 -07004# ----------------------------------------------------------------------------
tom1cd74ae2014-10-01 14:58:32 -07005
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
Pavlin Radoslavov91413792014-10-15 11:00:32 -070012[ -n "$projects" ] && cd $ONOS_ROOT && mvn --projects $projects ${@:-clean install}