# Run by:
#	. /usr/local/bin/settos_2

. /usr/local/bin/settos_none
TOSROOT="/opt/tinyos-2.x"

if [ -d "$TOSROOT" -a -d "$TOSROOT/tos" ]; then

    export TOSROOT
    export TOSDIR="$TOSROOT/tos"
    export MAKERULES="$TOSROOT/support/make/Makerules"

    # This hacks up other changes to CLASSPATH
    if [ -f /bin/cygwin1.dll ]; then
	export CLASSPATH="`cygpath -w $TOSROOT/support/sdk/java/tinyos.jar`;."
    else
	export CLASSPATH="$TOSROOT/support/sdk/java/tinyos.jar:."
    fi

    echo "tinyos version 2"
else
    echo "Error: TOS tools not configured" >&2
fi
