test.sh 355 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. DEVICE=""
  3. if [ "$1" == "" ]; then
  4. echo "ERROR: expecting Oboo IP address or mDNS name"
  5. exit 1
  6. fi
  7. DEVICE="$1"
  8. make clean
  9. make
  10. if [ $? == 0 ]; then
  11. rsync -va build-uno/firmware.hex root@${DEVICE}:/root/firmware.hex
  12. ssh -t root@$DEVICE 'sh /usr/bin/arduino-dock flash /root/firmware.hex'
  13. else
  14. echo ""
  15. echo "ERROR: build failed!"
  16. fi