COMPSFILE=comps.xml.main
WHERE=`pwd`
W1up=`dirname $WHERE`
export PYTHONPATH=/usr/lib/anaconda
if [ -f  $WHERE/$COMPSFILE ] ; then
   echo "Taking $WHERE/$COMPSFILE and verifying it "
   BASEDIR=$WHERE
else
   if [ -f  $W1up/$COMPSFILE ] ; then
   	echo "Taking $W1up/$COMPSFILE and verifying it "
        BASEDIR=$W1up
   else
   	echo "Could not find $COMPSFILE"
	exit
   fi
fi
W1up=`dirname $BASEDIR`
W2up=`dirname $W1up`
W3up=`dirname $W2up`

. $BASEDIR/scripts/locations.include
if [ `basename $W2up` = "sites" ] ; then
   SITE=sites/`basename $W1up`
   $BASEDIR/scripts/checkfullcomps.py $COMPSFILE `dirname $W3up` $DISTARCH $DEFAULT $SITE
else
   $BASEDIR/scripts/checkfullcomps.py $COMPSFILE $W3up $DISTARCH $DEFAULT
fi
