aboutsummaryrefslogtreecommitdiff
path: root/resources/utilities
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-08-30 16:14:42 +0100
committerFrancis Rowe <info@gluglug.org.uk>2015-08-30 16:14:42 +0100
commit3b3f7fe50c8092ddb7b09363b4d9f45c4cf38d39 (patch)
treefd0a8b9539c70024ee9fbee51e02eda622cafa1e /resources/utilities
parent4c15117d2b2a7b8e9dc2967992fe9b742602ee27 (diff)
downloadlibrebootfr-3b3f7fe50c8092ddb7b09363b4d9f45c4cf38d39.tar.gz
librebootfr-3b3f7fe50c8092ddb7b09363b4d9f45c4cf38d39.zip
grub-assemble: generate keymap list using function, not script
Diffstat (limited to 'resources/utilities')
-rwxr-xr-xresources/utilities/grub-assemble/gen.sh12
-rwxr-xr-xresources/utilities/grub-assemble/grub_memdisk_keymap29
2 files changed, 10 insertions, 31 deletions
diff --git a/resources/utilities/grub-assemble/gen.sh b/resources/utilities/grub-assemble/gen.sh
index e044efdf..7b836a62 100755
--- a/resources/utilities/grub-assemble/gen.sh
+++ b/resources/utilities/grub-assemble/gen.sh
@@ -23,6 +23,14 @@ grubdir="../../../grub"
source "modules.conf"
+list_keymaps () {
+ for keylayout in keymap/original/*
+ do
+ keymap="${keylayout##*/}"
+ printf "/boot/grub/layouts/%s.gkb=keymap/%s.gkb " "${keymap}" "${keymap}"
+ done
+}
+
printf "Creating GRUB ELF executable for configuration '%s'\n" "${1}"
if [ "${1}" = "vesafb" ]
then
@@ -37,7 +45,7 @@ then
--install-modules="${grub_install_modules}" \
/boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \
/dejavusansmono.pf2="../../../resources/grub/font/dejavusansmono.pf2" \
- $(./grub_memdisk_keymap)
+ $(list_keymaps)
elif [ "${1}" = "txtmode" ]
then
# Generate the grub.elf (txtmode)
@@ -51,7 +59,7 @@ then
--install-modules="${grub_install_modules}" \
/boot/grub/grub.cfg="../../../resources/grub/config/grub_memdisk.cfg" \
/memtest="../../../memtest86plus/memtest" \
- $(./grub_memdisk_keymap)
+ $(list_keymaps)
else
printf "grub-assemble gen.sh: invalid mode '%s'\n" "${1}"
exit 1
diff --git a/resources/utilities/grub-assemble/grub_memdisk_keymap b/resources/utilities/grub-assemble/grub_memdisk_keymap
deleted file mode 100755
index 451a69f3..00000000
--- a/resources/utilities/grub-assemble/grub_memdisk_keymap
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-#
-# lists keymaps
-#
-# Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-[ "x${DEBUG+set}" = 'xset' ] && set -v
-set -u -e
-
-for keylayout in keymap/original/*
-do
- keymap="${keylayout##*/}"
- printf "/boot/grub/layouts/%s.gkb=keymap/%s.gkb " "${keymap}" "${keymap}"
-done