Code Search for Developers
 
 
  

create_deploy_tarball.sh from EmStar at Krugle


Show create_deploy_tarball.sh syntax highlighted

#!/bin/bash


echo "This expects to run from the objdir of the target platform you want to make a tarball for!"
echo "This will also assume that the host you are doing this on is i686-linux!"
echo "Required parameters:"
echo "   --go     this makes this script run"
echo "Optional options:"
echo "   --eemstar /full/path/to/optional/directory which will contain extra "
echo "              stuff (including .files) to go into /home/emstar"
echo "              This stuff will be packed into the provided tarball"
echo "   --rootfs /full/path/to/rootfs/extras which contains extra files for the rootfs"
echo "              This cause this script to create two tarballs, one to be extraced into /home/emstar"
echo "              and one to be extracted into / which will contain /home/emstar as well"


export LD_LIBRARY_PATH=$PWD/../obj.i686-linux/lib

GO=0
EEMSTAR=0
ROOTFS=0

while [ $1 ] ; do
	case "$1" in
		--go)
			GO=1
			shift
			;;
		--eemstar)
			EEMSTAR=1
			EEMSTAR_STRING=$2
			shift
			shift
			;;
		--rootfs)
			ROOTFS=1
			ROOTFS_STRING=$2
			shift
			shift
			;;
		*)
			shift
			;;
	esac
done

if [ $GO -eq 0 ]; then
	echo "Must provide at least --go option!"
	exit 1
fi

if [ ! -x ../obj.i686-linux/emrun/emrun ]; then
	echo "../obj.i686-linux/emrun/emrun not found! Exiting"
	exit 1
fi

if [ $EEMSTAR -eq 1 ]; then
	if [ ! -d $EEMSTAR_STRING ]; then
		echo "$EEMSTAR_STRING is not a dir!"
		exit 1
	fi
fi

if [ $ROOTFS -eq 1 ]; then
	if [ ! -d $ROOTFS_STRING ]; then
		echo "$ROOTFS_STRING is not a dir!"
		exit 1
	fi
fi


CURRDIR=`pwd`
export LD_LIBRARY_PATH=`pwd`/../obj.i686-linux/lib
rm -rf /tmp/deps


# echo do this first, so copydeps will over write
if [ $EEMSTAR -eq 1 ]; then
	echo "Adding files from $EEMSTAR_STRING"
	rm -rf /tmp/tempdeps
	cp -a $EEMSTAR_STRING /tmp/tempdeps
	mv /tmp/tempdeps /tmp/deps
fi


echo "Running --copy-deps on .run files!!!"

#
# Do all the run file stuff here
#


#
# These are just exmaple, reaplace the .run files eith the right ones
#
# don't forget to set env vars

export PLATFORM=nims-stargate
../obj.i686-linux/emrun/emrun --copy-deps /tmp/deps ../devel/loc/testtabs/ar.run wlan0 " " " " " "
cp ../devel/loc/testtabs/ar.run /tmp/deps/ar.run
rm /tmp/deps/app.run

#../obj.i686-linux/emrun/emrun --copy-deps /tmp/deps ../devel/loc/testtabs/example.run wlan0
#mv /tmp/deps/app.run /tmp/deps/example.run
# or
#cp ../devel/loc/testtabs/example.run /tmp/deps/example.run
#rm /tmp/deps/app.run

#../obj.i686-linux/emrun/emrun --copy-deps /tmp/deps ../devel/loc/testtabs/example2.run wlan0
#mv /tmp/deps/app.run /tmp/deps/example2.run
# or
#cp ../devel/loc/testtabs/example2.run /tmp/deps/example2.run
#rm /tmp/deps/app.run


#../obj.i686-linux/emrun/emrun --copy-deps /tmp/deps ../devel/loc/testtabs/example3.run wlan0
#mv /tmp/deps/app.run /tmp/deps/example3.run
# or
#cp ../devel/loc/testtabs/example3.run /tmp/deps/example3.run
#rm /tmp/deps/app.run



cd /tmp/deps
cp -r $CURRDIR/lib .
cd lib
rm *.a libemtos.so libchannel.so
cd ..



CURRDATE=`date +%G%m%d%k%M`

echo $CURRDATE > /tmp/deps/.CREATED

echo tar -czf $CURRDIR/../../acoustic-home-emstar-only-$CURRDATE.tar.gz
tar -czf $CURRDIR/../../acoustic-home-emstar-only-$CURRDATE.tar.gz --exclude=.. .*

cd $CURRDIR

if [ $ROOTFS -eq 1 ]; then
	echo "Creating new rootfs tarball from $ROOTFS_STRING"
	rm -rf /tmp/arootfs
	cp -a $ROOTFS_STRING /tmp/arootfs
	mkdir -p /tmp/arootfs/home/emstar
	tar zxf $CURRDIR/../../acoustic-home-emstar-only-$CURRDATE.tar.gz
	cd /tmp/arootfs/
	echo $CURRDATE > /tmp/arootfs/.CREATED
	echo tar -czf $CURRDIR/../../acoustic-rootfs-emstar-$CURRDATE.tar.gz
	tar -czf $CURRDIR/../../acoustic-rootfs-emstar-$CURRDATE.tar.gz --exclude=.. .*
fi







See more files for this project here

EmStar

EmStar is a software system for developing and deploying wireless sensor networks involving Linux-based platforms. As the wireless sensor network community has attempted to deploy more complex designs---large-scale, long-lived systems that need self-organization and adaptivity---a number of difficult software design issues have arisen. Advances in software design have not kept pace with the capabilities of hardware. This is because designing for an adaptive, efficient, and useful sensor network has turned out to be surprisingly complex and difficult. EmStar is a Linux-based software framework, whose goal is to dramatically reduce this complexity, enabling work to be shared and reused, and simplifying and speeding the design of new sensor network applications.

Project homepage: http://cvs.cens.ucla.edu/emstar/
Programming language(s): C,Shell Script
License: other

  ar2mlat.sh
  compare.sh
  convert-map.c
  create_deploy_tarball.sh
  doexp
  examine.sh
  extract-noise.c
  ks-test.c
  makechirp.c
  match.c
  newrun-systest.pl
  nfs-start.sh
  noise-est.sh
  plotit.pl
  process-systest.pl
  process-systest2.sh
  processdoppler.c
  quickbuild.sh
  record-test.sh
  run_captured_data.sh
  runexp
  runexp2
  runstartexp
  start-range-expt-nfs.sh
  start-range-expt.sh
  start.sh
  startexp
  traflog.sh