summaryrefslogtreecommitdiffstats
path: root/util/abuild
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2016-12-13 15:29:30 -0700
committerMartin Roth <martinroth@google.com>2016-12-15 04:08:21 +0100
commit6bc44169680816e137ad9450f404c8463e7eb9d9 (patch)
tree1cf49f6bf4c377ea2378c18bcd3b5b89f4040aa6 /util/abuild
parent2ab96fc95554e43e65b9b8ed2f021cd8fe718c11 (diff)
downloadcoreboot-6bc44169680816e137ad9450f404c8463e7eb9d9.tar.gz
coreboot-6bc44169680816e137ad9450f404c8463e7eb9d9.tar.bz2
coreboot-6bc44169680816e137ad9450f404c8463e7eb9d9.zip
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@google.com> Reviewed-on: https://review.coreboot.org/17853 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/abuild')
-rwxr-xr-xutil/abuild/abuild9
1 files changed, 4 insertions, 5 deletions
diff --git a/util/abuild/abuild b/util/abuild/abuild
index c85db2c58dbf..7988feda8883 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