[coreboot-gerrit] New patch to review for coreboot: util/abuild: Fix update_config function
Martin Roth (martinroth@google.com)
gerrit at coreboot.org
Wed Dec 14 00:15:03 CET 2016
Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17853
-gerrit
commit c5f93040edf5638feebeb7e8552d90ace3eeb69d
Author: Martin Roth <martinroth at google.com>
Date: Tue Dec 13 15:29:30 2016 -0700
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 <martinroth at google.com>
---
util/abuild/abuild | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/util/abuild/abuild b/util/abuild/abuild
index c85db2c..7988fed 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
More information about the coreboot-gerrit
mailing list