diff options
Diffstat (limited to 'projects/grub')
-rwxr-xr-x | projects/grub/grub-helper | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/projects/grub/grub-helper b/projects/grub/grub-helper index 3e1420ac..e7e8a1fe 100755 --- a/projects/grub/grub-helper +++ b/projects/grub/grub-helper @@ -17,6 +17,9 @@ ARCH='arch' CONFIG='config' +FONTS='fonts' +FONT_FILE='font-file' +FONT_PROJECT='font-project' FORMAT='format' MODMIN='modules-minimal' PLATFORM='platform' @@ -27,6 +30,14 @@ grub_arch() { project_file_contents "${project}" "${CONFIGS}" "${ARCH}" "$@" } +grub_font_file() { + project_file_contents "${project}" "${CONFIGS}" "${FONT_FILE}" "$@" +} + +grub_font_project() { + project_file_contents "${project}" "${CONFIGS}" "${FONT_PROJECT}" "$@" +} + grub_format() { project_file_contents "${project}" "${CONFIGS}" "${FORMAT}" "$@" } @@ -60,6 +71,21 @@ grub_copy_modules() { cp -a "${grub_module_dir}"/*.@(mod|lst) "${keep_dir}" } +grub_build_font() { + # Font project-specific filenames and paths + local font_file="$(grub_font_file "${FONTS}" "$@")" + local font_project="$(grub_font_project "${FONTS}" "$@")" + local font_build_dir="${root}/${BUILD}/${font_project}" + + local grub_mkfont="${sources_path}/grub-mkfont" + + # GRUB font directory for outputting the built PF2 file + mkdir -p "${build_path}/${FONTS}" + + "${grub_mkfont}" --output="${build_path}/${FONTS}/${font_file%.*}.pf2" \ + "${font_build_dir}/${font_file}" +} + grub_build_utils() { ( # If arch and/or platform files don't exist, |