tom | 1cd74ae | 2014-10-01 14:58:32 -0700 | [diff] [blame] | 1 | #------------------------------------------------------------------------------ |
| 2 | # Echoes project-level directory if a Java file within is newer than its |
| 3 | # class file counterpart |
| 4 | #------------------------------------------------------------------------------ |
| 5 | |
| 6 | javaFile=${1#*\/src\/*\/java/} |
| 7 | basename=${1/*\//} |
| 8 | |
| 9 | [ $basename = "package-info.java" ] && exit 0 |
| 10 | |
| 11 | src=${1/$javaFile/} |
| 12 | project=${src/src*/} |
| 13 | classFile=${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 | |