diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-11-05 18:10:15 +0000 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-11-05 18:10:15 +0000 |
commit | 39da2b659e56a2e988c61291d1772fc92c129832 (patch) | |
tree | 7c65b2aed4a769574389b1c58d589c9fd4d868a0 /resources/scripts/helpers/build/roms/withgrub | |
parent | e907dfc60b411ff2406821bd4344be2643fc189a (diff) | |
download | librebootfr-39da2b659e56a2e988c61291d1772fc92c129832.tar.gz librebootfr-39da2b659e56a2e988c61291d1772fc92c129832.zip |
build/roms/withgrub: re-introduce standards compliance
klemens, please merge this!
Diffstat (limited to 'resources/scripts/helpers/build/roms/withgrub')
-rwxr-xr-x | resources/scripts/helpers/build/roms/withgrub | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/resources/scripts/helpers/build/roms/withgrub b/resources/scripts/helpers/build/roms/withgrub index 4eb92394..bc5af722 100755 --- a/resources/scripts/helpers/build/roms/withgrub +++ b/resources/scripts/helpers/build/roms/withgrub @@ -28,26 +28,26 @@ set -u -e printf "Building ROM images with the GRUB payload\n" -[ -d bin ] || mkdir bin +[ -d bin ] || mkdir "bin/" # Put GRUB payloads and config files # in the coreboot directory, ready for next step -cd coreboot +cd "coreboot/" for romtype in txtmode vesafb; do cd ../resources/utilities/grub-assemble ./gen.sh ${romtype} - rm -f ../../../coreboot/grub_${romtype}.elf - mv grub_${romtype}.elf ../../../coreboot/ - cd ../../../coreboot + rm -f "../../../coreboot/grub_${romtype}.elf" + mv "grub_${romtype}.elf" "../../../coreboot/" + cd "../../../coreboot" # GRUB configuration files for keylayout in ../resources/utilities/grub-assemble/keymap/original/*; do - keymap=${keylayout##*/} - cat ../resources/grub/config/extra/{common,${romtype}}.cfg > grub_${keymap}_${romtype}.cfg - printf "keymap %s\n" ${keymap} >> grub_${keymap}_${romtype}.cfg - cat ../resources/grub/config/menuentries/{common,${romtype}}.cfg >> grub_${keymap}_${romtype}.cfg + keymap="${keylayout##*/}" + cat "../resources/grub/config/extra/{common,${romtype}}.cfg" > "grub_${keymap}_${romtype}.cfg" + printf "keymap %s\n" "${keymap}" >> "grub_${keymap}_${romtype}.cfg" + cat "../resources/grub/config/menuentries/{common,${romtype}}.cfg" >> "grub_${keymap}_${romtype}.cfg" # grubtest.cfg should be able to switch back to grub.cfg - sed 's/grubtest.cfg/grub.cfg/' grub_${keymap}_${romtype}.cfg > grub_${keymap}_${romtype}_test.cfg + sed "s/grubtest.cfg/grub.cfg/" < "grub_${keymap}_${romtype}.cfg" > "grub_${keymap}_${romtype}_test.cfg" done done cd .. @@ -61,12 +61,12 @@ buildrom() { } if [ $# -gt 0 ]; then - for board in ${@}; do - buildrom ${board} + for board in "${@}"; do + buildrom "${board}" done else for board in resources/libreboot/config/grub/*; do - buildrom ${board##*/} + buildrom "${board##*/}" done fi @@ -130,6 +130,6 @@ if [ -d "bin/grub/" ]; then fi # The GRUB files are no longer needed -rm -f coreboot/grub*.{elf,cfg} +rm -f "coreboot/grub"*.{elf,cfg} printf "\n\n" |