diff options
Diffstat (limited to 'resources/scripts/build/grub/payload')
-rwxr-xr-x | resources/scripts/build/grub/payload | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/resources/scripts/build/grub/payload b/resources/scripts/build/grub/payload index bf52d2a1..4886a874 100755 --- a/resources/scripts/build/grub/payload +++ b/resources/scripts/build/grub/payload @@ -53,18 +53,15 @@ main() build_grub_payloads() { keylayoutfile=${1} + [ -f "${keylayoutfile}" ] || continue - if [ ! -f "${keylayoutfile}" ]; then - continue - fi keymap="${keylayoutfile##${grubcfgsdir}/keymap/}" keymap="${keymap%.gkb}" build_grub_elf "${keylayoutfile}" create_grub_config - printf "Created 'elf/grub/grub_%s.elf' and configs.'\n" \ - "${keymap}" + printf "Created 'elf/grub/grub_%s.elf' and configs.'\n" "${keymap}" } build_grub_elf() @@ -75,24 +72,22 @@ build_grub_elf() gcfg="${gcfg}/config/grub_memdisk.cfg" grubk="/boot/grub/layouts/${keymap}.gkb=${keylayoutfile}" grub/grub-mkstandalone \ - --grub-mkimage="grub/grub-mkimage" \ - -O i386-coreboot \ - -o elf/grub/grub_${keymap}.elf \ - -d grub/grub-core/ \ - --fonts= --themes= --locales= \ - --modules="${grub_modules}" \ - --install-modules="${grub_install_modules}" \ - ${gcfg} ${grubk} + --grub-mkimage="grub/grub-mkimage" \ + -O i386-coreboot \ + -o elf/grub/grub_${keymap}.elf \ + -d grub/grub-core/ \ + --fonts= --themes= --locales= \ + --modules="${grub_modules}" \ + --install-modules="${grub_install_modules}" \ + ${gcfg} ${grubk} } create_grub_config() { - sed "s/usqwerty/${keymap}/" \ - < ${grubcfgsdir}/config/grub.cfg \ - > elf/grub/grub_${keymap}.cfg - sed "s/grubtest.cfg/grub.cfg/" \ - < elf/grub/grub_${keymap}.cfg \ - > elf/grub/grub_${keymap}_test.cfg + sed "s/usqwerty/${keymap}/" < ${grubcfgsdir}/config/grub.cfg \ + > elf/grub/grub_${keymap}.cfg + sed "s/grubtest.cfg/grub.cfg/" < elf/grub/grub_${keymap}.cfg \ + > elf/grub/grub_${keymap}_test.cfg } main $@ |