From 56e54e647f35b886c45f393e1917e91c25233cdd Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 4 Nov 2023 21:46:48 -0600 Subject: detect-mcu.sh: don't hang when MCU isn't found; exit with an error instead --- bin/detect-mcu.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin') diff --git a/bin/detect-mcu.sh b/bin/detect-mcu.sh index 64bce96..761eac1 100755 --- a/bin/detect-mcu.sh +++ b/bin/detect-mcu.sh @@ -36,6 +36,10 @@ while [ -n "$TARGET" ]; do fi fi fi + # move up one dir + # if target doesn't change here, exit to avoid infinite loop + FOO="$TARGET" TARGET=$(dirname $TARGET) + [ "$FOO" = "$TARGET" ] && exit 1 done -- cgit v1.2.3