#!/bin/bash if [ "$#" -ne 1 ]; then echo "./deploy " exit fi getBins() { utilBinList="$(find $1 -executable -type f)" for bin in $utilBinList; do cp $bin $2; done } &>/dev/null setup() { rm -rf $1 mkdir $1 mkdir ./$1/sonyEw100 mkdir ./$1/sonyEw100/pesTool mkdir ./$1/sonyEw100/tuneTool } &>/dev/null upload() { scp -r $1/* pi@$2:/home/pi/Desktop } setup build getBins ./pesTool ./build/sonyEw100/pesTool getBins ./tuneTool ./build/sonyEw100/tuneTool cp ./tuneTool/channels.conf ./build/sonyEw100/tuneTool echo "Deploying sonyEw100 to the target device. [$1]" upload build $1