[Fuego] [PATCH 2/4] common: fix the error of is_on_sdk function

Qiu Tingting qiutt at cn.fujitsu.com
Mon Sep 17 08:23:31 UTC 2018


The error: Always return the result searched in the last directory, because the last result covers the previous result.
Save all results in tmp file and get the first result to fix the error when working on engine/scripts/functions.sh.

Signed-off-by: Qiu Tingting <qiutt at cn.fujitsu.com>
---
 engine/scripts/functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/engine/scripts/functions.sh b/engine/scripts/functions.sh
index ecae8c9..bf0b0cf 100755
--- a/engine/scripts/functions.sh
+++ b/engine/scripts/functions.sh
@@ -904,7 +904,7 @@ function is_on_sdk {
         # split search path on colon
         for d in $(echo "$3" | tr ":" "\n") ; do
             echo "search $d"
-            find "$SDKROOT$d" -name "$1" | head -n 1 >$tmpfile
+            find "$SDKROOT$d" -name "$1" | head -n 1 >>$tmpfile
         done
     fi
     LOCATION=$(head -n 1 $tmpfile)
-- 
2.7.4





More information about the Fuego mailing list