onos-build-selective-hook
480 Bytes
#!/bin/bash
# ----------------------------------------------------------------------------
# Echoes project-level directory if a Java file within is newer than the
# target directory.
# ----------------------------------------------------------------------------
javaFile=${1#*\/src\/*\/java/}
basename=${1/*\//}
[ $basename = "package-info.java" ] && exit 0
src=${1/$javaFile/}
project=${src/src*/}
target=$project/target
[ $target -nt ${src}$javaFile ] || echo ${src/src*/}