diff --git a/dist/tools/usb-serial/find-tty.sh b/dist/tools/usb-serial/find-tty.sh index 136513d3ef..5da8470bc6 100755 --- a/dist/tools/usb-serial/find-tty.sh +++ b/dist/tools/usb-serial/find-tty.sh @@ -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 diff --git a/dist/tools/usb-serial/list-ttys.sh b/dist/tools/usb-serial/list-ttys.sh index 9bd4c0c492..6b834b98c3 100755 --- a/dist/tools/usb-serial/list-ttys.sh +++ b/dist/tools/usb-serial/list-ttys.sh @@ -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