[Fuego] [PATCH 03/18] need_check: no need for testing if the file exists

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Tue Jan 30 09:59:21 UTC 2018


Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/scripts/need_check.sh | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/engine/scripts/need_check.sh b/engine/scripts/need_check.sh
index 58f76c3..d85e89a 100755
--- a/engine/scripts/need_check.sh
+++ b/engine/scripts/need_check.sh
@@ -173,22 +173,18 @@ function get_full_kconfig {
   gfk_board_tmpfile=$(mktemp)
   gfk_host_tmpfile=$(mktemp)
 
-  # try /proc/config.gz first
-  if cmd "test -f /proc/config.gz" ; then
-    if cmd "zcat /proc/config.gz >$gfk_board_tmpfile 2>/dev/null" ; then
-      get $gfk_board_tmpfile $out_filename
-      return 0
-    fi
-  else
-    echo "/proc/config.gz not found"
+  if cmd "zcat /proc/config.gz >$gfk_board_tmpfile 2>/dev/null" ; then
+    get $gfk_board_tmpfile $out_filename
+    return 0
   fi
 
-  # try /boot directory
   cmd "uname -r >$gfk_board_tmpfile"
   get $gfk_board_tmpfile $gfk_host_tmpfile
   kver=$(cat $gfk_host_tmpfile)
   conf_filename="/boot/config-$kver"
 
+  echo "/proc/config.gz not found, trying $conf_filename"
+
   if cmd "test -f $conf_filename" ; then
     get $conf_filename $out_filename
     return 0
-- 
2.7.4




More information about the Fuego mailing list