libreboot

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit a7ae3b69f0abdd08689e9d6992e488cde473c59d
parent 61a8051b71ca4d494b43966154da00b9f3d7b367
Author: Francis Rowe <info@gluglug.org.uk>
Date:   Sun, 30 Aug 2015 14:39:16 +0100

build/roms/withgrub: use function instead of array

Diffstat:
resources/scripts/helpers/build/roms/withgrub | 28++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/resources/scripts/helpers/build/roms/withgrub b/resources/scripts/helpers/build/roms/withgrub @@ -32,16 +32,6 @@ then mkdir "bin/" fi -boards="unknown" -if [ $# -gt 0 ]; then - # build only the ROM images that were requested - boards="${*}" -else - # build all ROM images - boards="$(for board in resources/libreboot/config/grub/*; do printf "%s\n" "${board##*/}"; done)" -fi - - # Put GRUB payloads and config files # in the coreboot directory, ready for next step cd "coreboot/" @@ -68,12 +58,22 @@ done cd ../ # Build ROM images for supported boards -for board in ${boards} -do - if [ -f "resources/libreboot/config/grub/${board}/config" ]; then +buildrom() { + board="$1" + if [[ -f "resources/libreboot/config/grub/${board}/config" ]]; then ./build roms withgrub_helper "${board}" fi -done +} + +if [[ $# -gt 0 ]]; then + for board in "${@}"; do + buildrom "$board" + done +else + for board in resources/libreboot/config/grub/*; do + buildrom "${board##*/}" + done +fi # Needed on i945 systems for the bucts/dd trick (documented) # This enables the ROM to be flashed over the lenovo bios firmware