aboutsummaryrefslogtreecommitdiff
path: root/bin/detect-mcu.sh
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-07 11:04:34 -0700
committerSelene ToyKeeper2023-11-07 11:04:34 -0700
commit96bb6aeb178182c95558c5157b6ddfaecfceb785 (patch)
tree6cd898456b8754e60d39f51d98e55b6cb895a01f /bin/detect-mcu.sh
parentMerge branch 'pull15' into trunk (diff)
downloadanduril-96bb6aeb178182c95558c5157b6ddfaecfceb785.tar.gz
anduril-96bb6aeb178182c95558c5157b6ddfaecfceb785.tar.bz2
anduril-96bb6aeb178182c95558c5157b6ddfaecfceb785.zip
shell script cleanup (fix lint warnings, remove unused scripts)
Diffstat (limited to 'bin/detect-mcu.sh')
-rwxr-xr-xbin/detect-mcu.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/detect-mcu.sh b/bin/detect-mcu.sh
index 8a93e21..57670e2 100755
--- a/bin/detect-mcu.sh
+++ b/bin/detect-mcu.sh
@@ -15,7 +15,7 @@ TARGET=$1
while [ -n "$TARGET" ]; do
#echo "... $TARGET"
if [ -f "$TARGET" ]; then # use the dir/$UI.h file
- ATTINY=$(grep 'ATTINY:' $TARGET | awk '{ print $3 }')
+ ATTINY=$(grep 'ATTINY:' "$TARGET" | awk '{ print $3 }')
if [ -n "$ATTINY" ]; then
echo "export MCUNAME=attiny${ATTINY}"
echo "export MCU=0x${ATTINY}"
@@ -39,7 +39,7 @@ while [ -n "$TARGET" ]; do
# move up one dir
# if target doesn't change here, exit to avoid infinite loop
FOO="$TARGET"
- TARGET=$(dirname $TARGET)
+ TARGET=$(dirname "$TARGET")
[ "$FOO" = "$TARGET" ] && exit 1
done