#!/bin/sh

# $1 is a simple directory name with no slashes in it

root=$1

# We want to print the name of every directory that contains .java files.
# The "type -d" after the -or is just to have something that's true.

find $root -mindepth 1 -type d \! -empty \
	\( -exec sh -c 'ls {} | grep "java$" >/dev/null' \; -print \
	   -or -type d \) \
	| sed "s/^$root\///" \
	| tr "/" "."

