Index: src/scripts/autotest_lib.sh |
diff --git a/src/scripts/autotest_lib.sh b/src/scripts/autotest_lib.sh |
index f60382c5c8edb3f4bbcab7f661343dd138214552..c4ad9d679501b692a6af83f4d1524edbd2fb8877 100644 |
--- a/src/scripts/autotest_lib.sh |
+++ b/src/scripts/autotest_lib.sh |
@@ -15,11 +15,13 @@ function check_board() { |
local board_names="" |
local index=1 |
local found=0 |
- for board in ../overlays/overlay-* |
+ for overlay_path in "${SRC_ROOT}"/overlays/overlay-* |
do |
- board_names[index]=${board:20} |
+ local overlay="$(basename \"${overlay_path}\")" |
+ local board="${overlay#overlay-}" |
+ board_names[index]="${board}" |
index+=1 |
- if [ "${FLAGS_board}" == "${board:20}" ] |
+ if [ "${FLAGS_board}" == "${board}" ] |
then |
found=1 |
fi |