Add Intel copyright header.
[profile/ivi/cowhide.git] / examples / hoofbeats / tests / deploy.sh
1 #!/bin/sh
2 LOCAL_PORT=11223
3 SOCKET='unix:/tmp/qemu.sock'
4
5 echo "Deleting the old widget file..."
6 sdb shell 'rm /home/developer/hoofbeats-unittests.wgt'
7
8 echo "Building..."
9 ./make-wgt.sh >/dev/null
10
11 echo "Pushing the widget file..."
12 sdb push hoofbeats-unittests.wgt /home/developer
13
14 echo "Installing the widget file..."
15 REMOTE_PORT=`sdb shell 'wrt-launcher -k 1234567891; sleep 2; wrt-installer -un 1234567891; wrt-installer -i /home/developer/hoofbeats-unittests.wgt; wrt-launcher -d -s 1234567891' | awk '/port:/ { print $2 }'`
16
17 echo "Enabling forwarding to port $PORT..."
18 echo "hostfwd_remove ::$LOCAL_PORT" | socat $SOCKET -
19 echo "hostfwd_add ::$LOCAL_PORT-:$REMOTE_PORT" | socat $SOCKET -
20
21 echo "Starting debuggin..."
22 google-chrome http://localhost:$LOCAL_PORT
23 echo "Done."