#!/bin/csh -f
set GLORYDIR=/home/cosmos/west/proj/glory
alias wcb /usr/ucb/wc -c
unsetenv LANG

foreach i(`cat ${GLORYDIR}/member`)
	echo "$i is now checking...."
	setenv STATEFILE `echo $i | sed 's/^.*:.:\(.*\):.*$/\1/'`
	setenv THESISDIR `echo $i | sed 's/^.*:.:.*:\(.*\)$/\1/'`
	if (-e ${THESISDIR}/hoyanohimono) then
		echo "glory found antiglory file. No more search."
	else
	date >> $GLORYDIR/log/$STATEFILE
	wcb $THESISDIR/*.tex | /bin/grep total | /bin/sed -e s/total// | /bin/tee -a $GLORYDIR/log/$STATEFILE
	endif
end
