#!/bin/bash
# The script is named: "tinyOS-2.1.1.sh"
# Author: Marcin Szczodrak
# Date Apr 2, 2010
apt-get update
apt-get install -y --assume-yes build-essential gcc g++ python-dev
echo 'Updating repository for Lucid Lynx'
echo "\n\n# TinyOS\n\ndeb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main" >> /etc/apt/sources.list
apt-get update
apt-get install -y --force-yes tinyos-2.1.1
echo -ne "\n#Sourcing the tinyos environment variable setup script" >> /etc/profile
echo "source /opt/tinyos-2.1.1/tinyos.sh" >> /etc/profile
echo -ne "\n #Set the envoronment variables for TinyOS \n" >> /etc/profile
echo export TOSROOT=/opt/tinyos-2.1.1 >> /etc/profile
echo export TOSDIR=/opt/tinyos-2.1.1/tos >> /etc/profile
echo export CLASSPATH=/opt/tinyos-2.1.1/support/sdk/java/tinyos.jar:. >> /etc/profile
echo export MAKERULES=/opt/tinyos-2.1.1/support/make/Makerules >> /etc/profile
echo export PATH=/opt/msp430/bin:$PATH >> /etc/profile
echo export PYTHONPATH=.:$TOSROOT/support/sdk/python:$PYTHONPATH >> /etc/profile
#echo export MOTECOM=serial@/dev/ttyUSB0:115200 >> /etc/profile # in my case USB0 is used to program and USB1 to communicate
#echo export INTELMOTE2_CONTRIB_DIR=/opt/tinyos-2.x-contrib/intelmote2
source /etc/profile
echo 'DONE'
# http://www.cs.columbia.edu/~msz/wsn/
没有评论:
发表评论