#!/bin/sh

for i in `echo "2001\n2002\n2003\n2004\n2005\n2006\n2007"`
do
	if [ -d $1/$i ]
	then
		mv $1/*-$i*.gif $1/$i
	else
		echo "$i doesn't exist -- creating..."
		mkdir $1/$i
		mv $1/*-$i.gif $1/$i
	fi
	./index.sh $1> $1/index.html
done
