#!/bin/csh -bf
find . -type f -print >/tmp/boneslist.$$
set foo=()
foreach i (`cat /tmp/boneslist.$$`)
	grep NOENCRYPTION $i >&/dev/null
	if ($status) continue
	echo "fixing $i"
	unifdef -t -DNOENCRYPTION $i |sed -e 's;\$Header;Bones$Header;' -e 's;\$Id;Bones$Id;' >$i.bones
	mv $i $i.old
	mv $i.bones $i
	set foo=($foo $i)	
end
rm -f /tmp/boneslist.$$
touch /tmp/boneslist.$$
foreach i ($foo)
	diff -c $i.old $i >>/tmp/bonesdiffs.$$
end
echo "look over /tmp/bonesdiffs.$$ for a list of differences created"
echo ""
echo "Don't forget to remove the DES code!"
exit 0
