+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.
}
# 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
echo "$0 (GNU GRUB ${package_version})"
exit 0 ;;
-o)
- shift
- grub_cfg=$1
+ next_grub_cfg=:
;;
--output=*)
grub_cfg=`echo "$option" | sed 's/--output=//'`
;;
esac
done
+if $next_grub_cfg; then
+ echo "Missing argument to \`-o'" 1>&2
+ usage
+ exit 1
+fi
. ${libdir}/grub/grub-mkconfig_lib