aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-04 21:46:48 -0600
committerSelene ToyKeeper2023-11-04 21:46:48 -0600
commit56e54e647f35b886c45f393e1917e91c25233cdd (patch)
tree6146151c512952799712052548b8bb79522206e3
parentadded missing noctigon-k9.3 files hidden by an overzealous .gitignore rule (diff)
downloadanduril-56e54e647f35b886c45f393e1917e91c25233cdd.tar.gz
anduril-56e54e647f35b886c45f393e1917e91c25233cdd.tar.bz2
anduril-56e54e647f35b886c45f393e1917e91c25233cdd.zip
detect-mcu.sh: don't hang when MCU isn't found; exit with an error instead
-rwxr-xr-xbin/detect-mcu.sh4
1 files changed, 4 insertions, 0 deletions
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