3 SOCKET='unix:/tmp/qemu.sock'
5 echo "Deleting the old widget file..."
6 sdb shell 'rm /home/developer/hoofbeats-unittests.wgt'
9 ./make-wgt.sh >/dev/null
11 echo "Pushing the widget file..."
12 sdb push hoofbeats-unittests.wgt /home/developer
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 }'`
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 -
21 echo "Starting debuggin..."
22 google-chrome http://localhost:$LOCAL_PORT