blob: c27d7471260c4379f66718db795cc8c8098f03c9 [file] [log] [blame]
Jonathan Hart8a030cd2014-10-07 10:52:29 -07001#!/bin/bash
Pavlin Radoslavov91413792014-10-15 11:00: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.
Pavlin Radoslavov91413792014-10-15 11:00:32 -07005# ----------------------------------------------------------------------------
tom1cd74ae2014-10-01 14:58:32 -07006
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*/}