aboutsummaryrefslogtreecommitdiff
path: root/projects/grub/grub-helper
diff options
context:
space:
mode:
authorAndrew Robbins <contact@andrewrobbins.info>2017-09-01 23:51:49 -0400
committerAndrew Robbins <contact@andrewrobbins.info>2017-09-02 00:41:11 -0400
commit0b4d473546bedc7c1431c63602d56a718c071dc8 (patch)
tree0beea48265af4f7c5413a6d50a29079bea443690 /projects/grub/grub-helper
parent89c7df5adcf1a01fb530b84198d87a096217a162 (diff)
downloadlibrebootfr-0b4d473546bedc7c1431c63602d56a718c071dc8.tar.gz
librebootfr-0b4d473546bedc7c1431c63602d56a718c071dc8.zip
Conditionally create dir to store compiled keymaps
Diffstat (limited to 'projects/grub/grub-helper')
-rwxr-xr-xprojects/grub/grub-helper7
1 files changed, 6 insertions, 1 deletions
diff --git a/projects/grub/grub-helper b/projects/grub/grub-helper
index dca9b3a5..3e1420ac 100755
--- a/projects/grub/grub-helper
+++ b/projects/grub/grub-helper
@@ -82,8 +82,13 @@ grub_build_utils() {
grub_build_layout() {
local raw_layout="${1##*/}"
local raw_layout_path="$1"
+ local keymap_out_path="${build_path}/keymaps"
local grub_mklayout="${sources_path}/grub-mklayout"
- local grub_kbd_layout="${build_path}/${raw_layout}.gkb"
+ local grub_kbd_layout="${keymap_out_path}/${raw_layout}.gkb"
+
+ if ! [[ -e "${keymap_out_path}" ]]; then
+ mkdir -p "${keymap_out_path}"
+ fi
"${grub_mklayout}" --output="${grub_kbd_layout}" --input="${raw_layout_path}"
}