All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make 10_linux' test_gt() a bit more generic
@ 2009-08-04 19:19 Robert Millan
  2009-08-07 12:05 ` Robert Millan
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Millan @ 2009-08-04 19:19 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 492 bytes --]


This makes 10_linux' test_gt() a bit more generic so that it can be
moved (along with a few other functions) to grub-mkconfig_lib, where
it'll be usable by 10_freebsd.

This will allow handling multiple kernel versions in 10_freebsd, like
10_linux does.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

[-- Attachment #2: test_gt.diff --]
[-- Type: text/x-diff, Size: 623 bytes --]

2009-08-04  Robert Millan  <rmh.grub@aybabtu.com>

	* util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
	not just "vmlinu[zx]".

Index: util/grub.d/10_linux.in
===================================================================
--- util/grub.d/10_linux.in	(revision 2466)
+++ util/grub.d/10_linux.in	(working copy)
@@ -67,8 +67,8 @@ test_numeric ()
 
 test_gt ()
 {
-  local a=`echo $1 | sed -e "s/vmlinu[zx]-//g"`
-  local b=`echo $2 | sed -e "s/vmlinu[zx]-//g"`
+  local a=`echo $1 | sed -e "s/[^-]*-//g"`
+  local b=`echo $2 | sed -e "s/[^-]*-//g"`
   local cmp=gt
   if [ "x$b" = "x" ] ; then
     return 0

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

end of thread, other threads:[~2009-08-10 11:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 19:19 [PATCH] make 10_linux' test_gt() a bit more generic Robert Millan
2009-08-07 12:05 ` Robert Millan
2009-08-08  5:38   ` Pavel Roskin
2009-08-10 11:36     ` Robert Millan

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.