All of lore.kernel.org
 help / color / mirror / Atom feed
* Config file generation failure on Linux
@ 2009-12-30 15:01 Grégoire Sutre
  2010-01-01 12:03 ` Robert Millan
  0 siblings, 1 reply; 6+ messages in thread
From: Grégoire Sutre @ 2009-12-30 15:01 UTC (permalink / raw)
  To: The development of GNU GRUB

Hi,

Config file generation with grub-mkconfig fails on Linux when grub is 
not installed in the same prefix as gettext, since the script 
util/grub.d/10_linux.in contains:

. ${bindir}/gettext.sh

A possible patch is given below, but there are surely other ways to deal 
with it.  The patch simply falls back to echo instead of gettext if the 
gettext binary cannot be found.

Thanks for your time,

Grégoire

--- util/grub.d/10_linux.in.orig	2009-12-30 15:37:01.000000000 +0100
+++ util/grub.d/10_linux.in
@@ -22,7 +22,12 @@ bindir=@bindir@
  libdir=@libdir@
  . ${libdir}/grub/grub-mkconfig_lib

-. ${bindir}/gettext.sh
+if $(which gettext >/dev/null 2>/dev/null) ; then
+  gettext="gettext"
+else
+  gettext="echo"
+fi
+
  export TEXTDOMAIN=@PACKAGE@
  export TEXTDOMAINDIR=@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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-03 23:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-30 15:01 Config file generation failure on Linux Grégoire Sutre
2010-01-01 12:03 ` Robert Millan
2010-01-02 14:05   ` Config file generation failure on Linux (gettext.sh) Grégoire Sutre
2010-01-03 16:50     ` Robert Millan
2010-01-03 16:55       ` Robert Millan
2010-01-03 23:16         ` Grégoire Sutre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.