Skip to content

Commit ed08d44

Browse files
committed
adds debug log
1 parent 1ce035d commit ed08d44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bittide-instances/data/picocom/start.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ set -e
1414
PICOCOM_STDOUT_LOG="${PICOCOM_STDOUT_LOG:-/dev/null}"
1515
stdout_dir=$(dirname "${PICOCOM_STDOUT_LOG}")
1616
mkdir -p "${stdout_dir}"
17+
touch "$PICOCOM_STDOUT_LOG"
1718

1819
# Default stderr to /dev/null
1920
PICOCOM_STDERR_LOG="${PICOCOM_STDERR_LOG:-/dev/null}"
2021
stderr_dir=$(dirname "${PICOCOM_STDERR_LOG}")
2122
mkdir -p "${stderr_dir}"
22-
touch "$PICOCOM_STDOUT_LOG"
2323
touch "$PICOCOM_STDERR_LOG"
2424

2525
PICOCOM_BAUD="${PICOCOM_BAUD:-921600}"
@@ -29,7 +29,7 @@ PICOCOM_BAUD="${PICOCOM_BAUD:-921600}"
2929
# Flags: --pid: causes tail to close when picocom closes
3030
# -n 0: Only read out the latest lines, not the last 10 lines
3131
# -F: Could also be -f, but -F is apparently slightly safer due to inodes
32-
tail --pid=$$ -n 0 -F "${PICOCOM_STDOUT_LOG}" &
32+
tail --pid=$$ -n 0 -F "${PICOCOM_STDOUT_LOG}" | tee "myTest.log" &
3333
tail --pid=$$ -n 0 -F "${PICOCOM_STDERR_LOG}" >&2 &
3434

3535
exec picocom --baud "${PICOCOM_BAUD}" --imap lfcrlf --omap lfcrlf $@ \

0 commit comments

Comments
 (0)