Robert Millan wrote:
On Sun, Jan 03, 2010 at 05:50:08PM +0100, Robert Millan wrote:
As long as the script complains appropiately and exits non-zero if gettext
was installed, I would consider it robust (keep in mind grub.cfg isn't
^^^
I meant "wasn't" of course.
Ok, here is the new patch. This one also takes care of 10_kfreebsd, as
it uses gettext in the same way as 10_linux. Please let me know if I
missed something.
Thanks,
Grégoire
--- configure.ac.orig 2010-01-03 23:34:44.000000000 +0100
+++ configure.ac
@@ -179,6 +179,7 @@ test "x$GCC" = xyes || AC_MSG_ERROR([GCC
AC_GNU_SOURCE
AM_GNU_GETTEXT([external])
+AC_PATH_PROG([GETTEXTBIN], [gettext], [echo])
AC_SYS_LARGEFILE
# Identify characteristics of the host architecture.
--- util/grub.d/10_kfreebsd.in.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/grub.d/10_kfreebsd.in
@@ -20,9 +20,14 @@ pref...@prefix@
exec_pref...@exec_prefix@
bind...@bindir@
libd...@libdir@
+gette...@gettextbin@
. ${libdir}/grub/grub-mkconfig_lib
-. ${bindir}/gettext.sh
+if [ "x${gettext}" != "xecho" ] && ! test -x "${gettext}" ; then
+ echo "10_kfreebsd: error: \`${gettext}' is missing." >&2
+ exit 1
+fi
+
export textdoma...@package@
export textdomaind...@localedir@
@@ -37,7 +42,7 @@ kfreebsd_entry ()
version="$2"
recovery="$3" # not used yet
args="$4" # not used yet
- title="$(gettext "%s, with kFreeBSD %s")"
+ title="$(${gettext} "%s, with kFreeBSD %s")"
printf "menuentry \"${title}\" {\n" "${os}" "${version}"
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} |
sed -e "s/^/\t/")"
--- util/grub.d/10_linux.in.orig 2010-01-02 14:42:38.000000000 +0100
+++ util/grub.d/10_linux.in
@@ -20,9 +20,14 @@ pref...@prefix@
exec_pref...@exec_prefix@
bind...@bindir@
libd...@libdir@
+gette...@gettextbin@
. ${libdir}/grub/grub-mkconfig_lib
-. ${bindir}/gettext.sh
+if [ "x${gettext}" != "xecho" ] && ! test -x "${gettext}" ; then
+ echo "10_linux: error: \`${gettext}' is missing." >&2
+ exit 1
+fi
+
export textdoma...@package@
export textdomaind...@localedir@
@@ -54,9 +59,9 @@ linux_entry ()
recovery="$3"
args="$4"
if ${recovery} ; then
- title="$(gettext "%s, with Linux %s (recovery mode)")"
+ title="$(${gettext} "%s, with Linux %s (recovery mode)")"
else
- title="$(gettext "%s, with Linux %s")"
+ title="$(${gettext} "%s, with Linux %s")"
fi
printf "menuentry \"${title}\" {\n" "${os}" "${version}"
if [ -z "${prepare_boot_cache}" ]; then
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel