* util/grub-mkconfig.in: Fix handling of -o so that it works when
not the first option.
This commit is contained in:
parent
c0f48e654d
commit
21717c8fca
2 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-05-21 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* util/grub-mkconfig.in: Fix handling of -o so that it works when
|
||||
not the first option.
|
||||
|
||||
2010-05-20 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* util/grub-mkrelpath.c (usage): Remove excess apostrophe.
|
||||
|
|
|
@ -50,7 +50,13 @@ EOF
|
|||
}
|
||||
|
||||
# Check the arguments.
|
||||
next_grub_cfg=false
|
||||
for option in "$@"; do
|
||||
if $next_grub_cfg; then
|
||||
grub_cfg=$option
|
||||
next_grub_cfg=false
|
||||
continue
|
||||
fi
|
||||
case "$option" in
|
||||
-h | --help)
|
||||
usage
|
||||
|
@ -59,8 +65,7 @@ for option in "$@"; do
|
|||
echo "$0 (GNU GRUB ${package_version})"
|
||||
exit 0 ;;
|
||||
-o)
|
||||
shift
|
||||
grub_cfg=$1
|
||||
next_grub_cfg=:
|
||||
;;
|
||||
--output=*)
|
||||
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
||||
|
@ -72,6 +77,11 @@ for option in "$@"; do
|
|||
;;
|
||||
esac
|
||||
done
|
||||
if $next_grub_cfg; then
|
||||
echo "Missing argument to \`-o'" 1>&2
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. ${libdir}/grub/grub-mkconfig_lib
|
||||
|
||||
|
|
Loading…
Reference in a new issue