]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Search for tos-deluge in PATH first (patch from Aurelien Francillon).
authorrazvanm <razvanm>
Fri, 8 Jun 2007 16:52:12 +0000 (16:52 +0000)
committerrazvanm <razvanm>
Fri, 8 Jun 2007 16:52:12 +0000 (16:52 +0000)
apps/tests/deluge/Blink/burn

index 1418e38229ece16570862c88e1008bb1b01f1f84..6b41342debadbfec085e2cc28d29158e23f64f43 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/bash
 
+TOS_DELUGE=`type -p tos-deluge`
+if [[ ! -x ${TOS_DELUGE} ]] ; then 
+    TOS_DELUGE=../../../../tools/tinyos/misc/tos-deluge
+fi 
+
+echo ${TOS_DELUGE}
+
 if [ $# -ne 2 ]; then
   echo "Usage: $0 <port> <platform>"
   echo "<port>       For example, /dev/ttyUSB0"
@@ -30,7 +37,7 @@ echo ==================== Compile a new Blink ====================
 CFLAGS=-DBLINK_REVERSE\ -DDELUGE_BASESTATION make $PLATFORM 
 
 echo ==================== Upload the image ====================
-../../../../tools/tinyos/misc/tos-deluge $PORT $PLATFORM -i 0 build/$PLATFORM/tos_image.xml
+${TOS_DELUGE} $PORT $PLATFORM -i 0 build/$PLATFORM/tos_image.xml
 
 echo ==================== Reboot ====================
-../../../../tools/tinyos/misc/tos-deluge $PORT $PLATFORM -r 0 
+${TOS_DELUGE} $PORT $PLATFORM -r 0