tom

Fixed 'obs' to trigger when any Java source file is newer than the target directory.

1 #------------------------------------------------------------------------------ 1 #------------------------------------------------------------------------------
2 -# Echoes project-level directory if a Java file within is newer than its 2 +# Echoes project-level directory if a Java file within is newer than the
3 -# class file counterpart 3 +# target directory.
4 #------------------------------------------------------------------------------ 4 #------------------------------------------------------------------------------
5 5
6 javaFile=${1#*\/src\/*\/java/} 6 javaFile=${1#*\/src\/*\/java/}
...@@ -10,9 +10,7 @@ basename=${1/*\//} ...@@ -10,9 +10,7 @@ basename=${1/*\//}
10 10
11 src=${1/$javaFile/} 11 src=${1/$javaFile/}
12 project=${src/src*/} 12 project=${src/src*/}
13 -classFile=${javaFile/.java/.class} 13 +target=$project/target
14 14
15 -[ ${project}target/classes/$classFile -nt ${src}$javaFile -o \ 15 +[ $target -nt ${src}$javaFile ] || echo ${src/src*/}
16 - ${project}target/test-classes/$classFile -nt ${src}$javaFile ] \
17 - || echo ${src/src*/}
18 16
......