Skip to content

Commit 6d4c96e

Browse files
committed
Add simulator watch script
1 parent 6fbb0e7 commit 6d4c96e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

upython/scripts/watch-simulator

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
watch_files() {
4+
for file in /tmp/AstroPowerBox-GPIOSimulator/*; do
5+
echo "$(basename "$file"): $(cat "$file")"
6+
done
7+
}
8+
9+
if [ "$1" = watch_files ]; then
10+
watch_files
11+
else
12+
watch -n 0.1 "$@" "$0 watch_files"
13+
fi
14+

0 commit comments

Comments
 (0)