From 6bc44169680816e137ad9450f404c8463e7eb9d9 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Tue, 13 Dec 2016 15:29:30 -0700 Subject: util/abuild: Fix update_config function - Because $configoptions contains embedded newlines that we want to be interpreted when we pipe it out to the config file, change that back to a printf, and tell shellcheck that we want to do it. - 'make olddefconfig' & 'yes "" | make oldconfig' give us the same output for the config file, but olddefconfig doesn't generate the log the way oldconfig does. Go back to the previous behavior. - Don't overwrite the config log with make savedefconfig. Change-Id: I4966a3bb2541b452eeb4ca73ac3cd727f8525636 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/17853 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi --- util/abuild/abuild | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/util/abuild/abuild b/util/abuild/abuild index c85db2c58d..7988feda88 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -260,14 +260,13 @@ function update_config fi if [ "$quiet" == "false" ]; then echo " $MAINBOARD ($customizing)"; fi - echo "$configoptions" >> "${config_file}" + # shellcheck disable=SC2059 + printf "$configoptions" >> "${config_file}" - # shellcheck disable=SC2086 - $MAKE olddefconfig $silent "DOTCONFIG=${config_file}" "obj=${build_dir}" "objutil=$TARGET/sharedutils" &> "${build_dir}/config.log" ; \ + yes "" 2>/dev/null | $MAKE oldconfig $silent "DOTCONFIG=${config_file}" "obj=${build_dir}" "objutil=$TARGET/sharedutils" &> "${build_dir}/config.log" ; \ CONFIG_OK=$? if [ $CONFIG_OK -eq 0 ]; then - # shellcheck disable=SC2086 - $MAKE savedefconfig $silent DEFCONFIG="${defconfig_file}" DOTCONFIG="${config_file}" obj="${build_dir}" objutil="$TARGET/sharedutils" &> "${build_dir}/config.log" + $MAKE savedefconfig $silent DEFCONFIG="${defconfig_file}" DOTCONFIG="${config_file}" obj="${build_dir}" objutil="$TARGET/sharedutils" &>> "${build_dir}/config.log" return $? else return 1 -- cgit v1.2.3