#!/bin/bash export SSH_AUTH_SOCK="/home/sebastian/.config/KeePass/agent.socket" #echo "Deploying source and executable from $2 ..." echo "Deploying executable $1" rsync -av --delete -e ssh $2/Debug/$1 pi@192.168.0.7:/opt/coffeepi/Debug COUNT=$(cat "$2/buildno") if [ "$1" == "coffeecode" ]; then echo "Increasing build No.." echo $(($COUNT+1)) > "$2/buildno" echo "Current build number is $(($COUNT+1))" else echo "Current build number is $COUNT" fi