Add a --locale-directory option to grub-install and related tools.

* include/grub/util/install.h (GRUB_INSTALL_OPTIONS): Add
--locale-directory option.
(enum grub_install_options): Add
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY.
* util/grub-install-common.c (grub_install_help_filter): Handle
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY.
(grub_install_parse): Likewise.
(get_localedir): New function to check for a user-provided option
before trying grub_util_get_localedir.
(copy_locales): Use get_localedir rather than
grub_util_get_localedir.  Handle differing locale directory layouts.
(grub_install_copy_files): Likewise.
This commit is contained in:
Colin Watson 2013-11-25 18:04:50 +00:00
parent 61e1b9a49d
commit 07e3b04742
3 changed files with 56 additions and 5 deletions

View file

@ -47,6 +47,9 @@
{ "override-directory", GRUB_INSTALL_OPTIONS_DIRECTORY2, \
N_("DIR"), OPTION_HIDDEN, \
N_("use images and modules under DIR [default=%s/<platform>]"), 1 }, \
{ "locale-directory", GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY, \
N_("DIR"), 0, \
N_("use translations under DIR [default=%s]"), 1 }, \
{ "grub-mkimage", GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE, \
"FILE", OPTION_HIDDEN, 0, 1 }, \
/* TRANSLATORS: "embed" is a verb (command description). "*/ \
@ -102,6 +105,7 @@ enum grub_install_options {
GRUB_INSTALL_OPTIONS_INSTALL_LOCALES,
GRUB_INSTALL_OPTIONS_INSTALL_COMPRESS,
GRUB_INSTALL_OPTIONS_DIRECTORY2,
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY,
GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE
};