summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtool/speedy-download19
1 files changed, 19 insertions, 0 deletions
diff --git a/tool/speedy-download b/tool/speedy-download
new file mode 100755
index 0000000..0da40d5
--- /dev/null
+++ b/tool/speedy-download
@@ -0,0 +1,19 @@
1#!/bin/bash
2
3set -eu
4
5FILE="$1"
6shift
7
8echo "$@" > /dev/ttyUSB0
9
10cat "$FILE" >/dev/ttyUSB0 &
11SEND=$!
12
13cat -u /dev/ttyUSB0 &
14RECV=$!
15
16wait "$SEND"
17sleep 1
18kill "$RECV"
19wait