blob: 233ab1a5021521f5055ec4927ee6b96a27adc5fc [file] [log] [blame]
tom1cd74ae2014-10-01 14:58:32 -07001#------------------------------------------------------------------------------
2# Echoes project-level directory if a Java file within is newer than its
3# class file counterpart
4#------------------------------------------------------------------------------
5
6javaFile=${1#*\/src\/*\/java/}
7basename=${1/*\//}
8
9[ $basename = "package-info.java" ] && exit 0
10
11src=${1/$javaFile/}
12project=${src/src*/}
13classFile=${javaFile/.java/.class}
14
15[ ${project}target/classes/$classFile -nt ${src}$javaFile -o \
16 ${project}target/test-classes/$classFile -nt ${src}$javaFile ] \
17 || echo ${src/src*/}
18