Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist/tools/usb-serial: call ttys.py with its path [backport 2023.01] #19830

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dist/tools/usb-serial/find-tty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

exit_code=1

SCRIPTDIR="$(cd "$(dirname "$0")" || exit 1; pwd)"
for serial in "$@"; do
if ./ttys.py --format path --serial "$serial"; then
if "$SCRIPTDIR"/ttys.py --format path --serial "$serial"; then
exit_code=0
fi
done
Expand Down
3 changes: 2 additions & 1 deletion dist/tools/usb-serial/list-ttys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
# Public License v2.1. See the file LICENSE in the top level directory for more
# details.

./ttys.py --format path
SCRIPTDIR="$(cd "$(dirname "$0")" || exit 1; pwd)"
"$SCRIPTDIR"/ttys.py --format path
Loading