Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1517)

Unified Diff: src/scripts/autotest_lib.sh

Issue 1203001: Fix board lookup code to work from any directory. (Closed)
Patch Set: Add double quotes for safety. Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698