* 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>
|
2010-05-20 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
* util/grub-mkrelpath.c (usage): Remove excess apostrophe.
|
* util/grub-mkrelpath.c (usage): Remove excess apostrophe.
|
||||||
|
|
|
@ -50,7 +50,13 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check the arguments.
|
# Check the arguments.
|
||||||
|
next_grub_cfg=false
|
||||||
for option in "$@"; do
|
for option in "$@"; do
|
||||||
|
if $next_grub_cfg; then
|
||||||
|
grub_cfg=$option
|
||||||
|
next_grub_cfg=false
|
||||||
|
continue
|
||||||
|
fi
|
||||||
case "$option" in
|
case "$option" in
|
||||||
-h | --help)
|
-h | --help)
|
||||||
usage
|
usage
|
||||||
|
@ -59,8 +65,7 @@ for option in "$@"; do
|
||||||
echo "$0 (GNU GRUB ${package_version})"
|
echo "$0 (GNU GRUB ${package_version})"
|
||||||
exit 0 ;;
|
exit 0 ;;
|
||||||
-o)
|
-o)
|
||||||
shift
|
next_grub_cfg=:
|
||||||
grub_cfg=$1
|
|
||||||
;;
|
;;
|
||||||
--output=*)
|
--output=*)
|
||||||
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
||||||
|
@ -72,6 +77,11 @@ for option in "$@"; do
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
if $next_grub_cfg; then
|
||||||
|
echo "Missing argument to \`-o'" 1>&2
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
. ${libdir}/grub/grub-mkconfig_lib
|
. ${libdir}/grub/grub-mkconfig_lib
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue