here=`pwd`
if test ! -r Smakefile; then echo $here is not a chapter; exit 1; fi
for i
do
	if test ! -s $X/$i; then echo $i is not yet INSTALLed; continue; fi
	egrep "(^| )$i(:| .*:)" Smakefile | sed "s/:.*//" >/tmp/ft.$$
	if test ! -s /tmp/ft.$$; then echo $i is not on Smakefile; continue; fi
	(cd $X; mv `cat /tmp/ft.$$` $here )
	(cd $BKUP/x; mv `cat /tmp/ft.$$` $X )
	echo `cat /tmp/ft.$$` backed up
	rm /tmp/ft.$$
done
