OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 2 # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE.md file. | 4 # BSD-style license that can be found in the LICENSE.md file. |
5 | 5 |
6 source $(dirname $(readlink -f $0))/devdiscovery.shlib | 6 source $(dirname $(readlink -f $0))/devdiscovery.shlib |
7 | 7 |
8 if [ -z "$1" -o ! -s "$1" ]; then | 8 if [ -z "$1" -o ! -s "$1" ]; then |
9 echo "$0: Expecting a snapshot file as fist argument." | 9 echo "$0: Expecting a snapshot file as fist argument." |
10 exit 1 | 10 exit 1 |
11 fi | 11 fi |
12 | 12 |
(...skipping 10 matching lines...) Expand all Loading... |
23 # Configure the port to LK's default tty speed. | 23 # Configure the port to LK's default tty speed. |
24 stty -F $PORT 115200 | 24 stty -F $PORT 115200 |
25 | 25 |
26 SIZE=`cat $1 | wc -c` | 26 SIZE=`cat $1 | wc -c` |
27 | 27 |
28 echo "fletch" >$PORT | 28 echo "fletch" >$PORT |
29 sleep 1 | 29 sleep 1 |
30 echo $SIZE >$PORT | 30 echo $SIZE >$PORT |
31 sleep 1 | 31 sleep 1 |
32 cat $1 >$PORT | 32 cat $1 >$PORT |
OLD | NEW |