#!/bin/sh
#
# Simple script to scan for source and header files which do not appear
# to be in the CVS
#
shopt -s  nullglob
 
here=`pwd`
topd=`find . -type d -maxdepth 1 -mindepth 1`


(
	for dir in `find $topd  -type d`
	do
		cd $here/$dir

		for file in `echo *.[ch]* *.py *.png *.am *.sip *.dict *.sh *make.pro rekallui.* *.desktop`
		do
			if [ -L $file ]
			then
				:
			else
				if 	[ -f CVS/Entries ]
				then
					grep -q "/$file/" CVS/Entries || echo $dir/$file
				elif 	[ -f CVS_LOCAL/Entries ]
				then
					grep -q "/$file/" CVS_LOCAL/Entries || echo $dir/$file
				else
					: echo $dir/$file "(no CVS)"
				fi
			fi
		done
	done

)	| fgrep -v -e closure -e meta_unload -e .html -e .tab. -e .bz2
