blob: eb4e482a5aadf72b482ad8c7b11da21cbe6f4393 [file] [log] [blame]
Jonathan Hart8a030cd2014-10-07 10:52:29 -07001#!/bin/bash
tom1cd74ae2014-10-01 14:58:32 -07002#------------------------------------------------------------------------------
tom1a17eb42014-10-08 20:21:23 -07003# Echoes project-level directory if a Java file within is newer than the
4# target directory.
tom1cd74ae2014-10-01 14:58:32 -07005#------------------------------------------------------------------------------
6
7javaFile=${1#*\/src\/*\/java/}
8basename=${1/*\//}
9
10[ $basename = "package-info.java" ] && exit 0
11
12src=${1/$javaFile/}
13project=${src/src*/}
tom1a17eb42014-10-08 20:21:23 -070014target=$project/target
tom1cd74ae2014-10-01 14:58:32 -070015
tom1a17eb42014-10-08 20:21:23 -070016[ $target -nt ${src}$javaFile ] || echo ${src/src*/}
tom1cd74ae2014-10-01 14:58:32 -070017