aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/tools/dev/bin/onos-build-selective-hook
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/tools/dev/bin/onos-build-selective-hook')
-rwxr-xr-xframework/src/onos/tools/dev/bin/onos-build-selective-hook10
1 files changed, 10 insertions, 0 deletions
diff --git a/framework/src/onos/tools/dev/bin/onos-build-selective-hook b/framework/src/onos/tools/dev/bin/onos-build-selective-hook
new file mode 100755
index 00000000..fbe77522
--- /dev/null
+++ b/framework/src/onos/tools/dev/bin/onos-build-selective-hook
@@ -0,0 +1,10 @@
+#!/bin/bash
+# ----------------------------------------------------------------------------
+# Echoes project-level directory if a source file within is newer than the
+# target directory.
+# ----------------------------------------------------------------------------
+
+[ ${1/*\//} = "package-info.java" ] && exit 0
+
+project=${1/src*/}
+[ ${project}target -nt $1 ] || echo ${project}