onos/tools/dev/bin/onos-build-selective-hook
Pavlin Radoslavov 91413794ef Minor cleanup in some of the shell scripts in the "tools" directory.
No functional changes.

 * Description header formatting
 * Added missing new line at the end of a file
 * Removed extra new lines at the end of a file
2014-10-15 11:03:54 -07:00

17 lines
480 B
Bash
Executable File

#!/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*/}