deploy 663 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. if [ "$#" -ne 1 ]; then
  3. echo "./deploy <ip_address_of_Pi_target_device>"
  4. exit
  5. fi
  6. getBins() {
  7. utilBinList="$(find $1 -executable -type f)"
  8. for bin in $utilBinList; do cp $bin $2; done
  9. } &>/dev/null
  10. setup() {
  11. rm -rf $1
  12. mkdir $1
  13. mkdir ./$1/sonyEw100
  14. mkdir ./$1/sonyEw100/pesTool
  15. mkdir ./$1/sonyEw100/tuneTool
  16. } &>/dev/null
  17. upload() {
  18. scp -r $1/* pi@$2:/home/pi/Desktop
  19. }
  20. setup build
  21. getBins ./pesTool ./build/sonyEw100/pesTool
  22. getBins ./tuneTool ./build/sonyEw100/tuneTool
  23. cp ./tuneTool/channels.conf ./build/sonyEw100/tuneTool
  24. echo "Deploying sonyEw100 to the target device. [$1]"
  25. upload build $1