All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Grégoire Sutre" <gregoire.sutre@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Option handling in grub-mkconfig
Date: Fri, 21 May 2010 12:08:48 +0200	[thread overview]
Message-ID: <4BF65BB0.6010303@gmail.com> (raw)

Hi,

The processing of option `-o' in grub-mkconfig only works when
it is the first option.  The code is:

# Check the arguments.
for option in "$@"; do
     case "$option" in
[...]
     -o)
	shift
	grub_cfg=$1
	;;
     --output=*)
	grub_cfg=`echo "$option" | sed 's/--output=//'`
	;;


For instance:

grub-mkconfig -o /tmp/tata -o /tmp/titi
rm: invalid option -- 'o'
Try `rm --help' for more information.

grub-mkconfig --output=/tmp/tata -o /tmp/titi
rm: invalid option -- 'o'
Try `rm --help' for more information.


AFAICS, other scripts (grub-install, grub-mkrescue) only support the
long option (--output=FILE).

The simpler solution would be to get rid of `-o' in grub-mkconfig,
but this would break some user/distribution scripts (e.g. Debian's
update-grub).

What do you think?

Grégoire


             reply	other threads:[~2010-05-21 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21 10:08 Grégoire Sutre [this message]
2010-05-21 10:57 ` Option handling in grub-mkconfig Colin Watson
2010-05-21 12:19   ` Grégoire Sutre
2010-05-21 13:16     ` Colin Watson
2010-05-21 18:20       ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-24  4:42 ` BVK Chaitanya
2010-05-24 12:12   ` Grégoire Sutre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BF65BB0.6010303@gmail.com \
    --to=gregoire.sutre@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.