#!/bin/sh

if [ \! -d counters-off ]
then
	echo "Counters are not off."
	exit 0
fi

(
	top=`pwd`
	for j in `cd counters-off; echo *.html`
	do
		if [ "$j" = "mediaone-index.html" ]
		then
			echo put $j index.html
		else
			echo put $j
		fi
	done
	for i in `cd counters-off; find . -type d -print | cut -c2-`
	do
		echo "lcd "$top$i
		echo "cd "$i
		for j in `cd $top/counters-off$i ; echo *.html`
		do
			echo put $j
		done
	done
	echo quit
) | ftp people.ne.mediaone.net

echo "Check for success before I destroy all of the non-counter pages."
read a

rm -rf counters-off
