2008-02-09 Robert Millan <rmh@aybabtu.com>
* configure.ac: Probe for `help2man'. * Makefile.in (builddir): New variable. (HELP2MAN): Likewise. Set to `true' when @HELP2MAN@ doesn't provide it, or otherwise add a few flags/options to it. (install-local): For every executable utility or script that is installed, invoke $(HELP2MAN) to install a manpage based on --help output. * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so that it doesn't prevent --help from working in build tree. * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org' with `bug-grub@gnu.org'. * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise. * util/update-grub.in (usage): New function. Implement proper argument check, with support for --help and --version (as well as existing -y).
This commit is contained in:
parent
0d9ff7f075
commit
68807e5f37
8 changed files with 120 additions and 15 deletions
|
@ -45,9 +45,6 @@ force_lba=
|
|||
recheck=no
|
||||
debug=no
|
||||
|
||||
# for make_system_path_relative_to_its_root()
|
||||
. ${libdir}/grub/update-grub_lib
|
||||
|
||||
# Usage: usage
|
||||
# Print the usage.
|
||||
usage () {
|
||||
|
@ -120,6 +117,9 @@ for option in "$@"; do
|
|||
esac
|
||||
done
|
||||
|
||||
# for make_system_path_relative_to_its_root()
|
||||
. ${libdir}/grub/update-grub_lib
|
||||
|
||||
if test "x$install_device" = x; then
|
||||
echo "install_device not specified." 1>&2
|
||||
usage
|
||||
|
|
|
@ -49,7 +49,7 @@ Make GRUB rescue image.
|
|||
|
||||
grub-mkimage generates a bootable rescue image of the specified type.
|
||||
|
||||
Report bugs to <grub-devel@gnu.org>.
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ Make GRUB rescue image.
|
|||
|
||||
grub-mkimage generates a bootable rescue CD image for PowerMac and CHRP.
|
||||
|
||||
Report bugs to <grub-devel@gnu.org>.
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,41 @@ platform=@platform@
|
|||
grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}`
|
||||
grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`
|
||||
|
||||
# Usage: usage
|
||||
# Print the usage.
|
||||
usage () {
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTION]
|
||||
Generate /boot/grub/grub.cfg
|
||||
|
||||
-h, --help print this message and exit
|
||||
-v, --version print the version information and exit
|
||||
-y ignored for compatibility
|
||||
|
||||
Report bugs to <bug-grub@gnu.org>.
|
||||
EOF
|
||||
}
|
||||
|
||||
# Check the arguments.
|
||||
for option in "$@"; do
|
||||
case "$option" in
|
||||
-h | --help)
|
||||
usage
|
||||
exit 0 ;;
|
||||
-v | --version)
|
||||
echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
|
||||
exit 0 ;;
|
||||
-y)
|
||||
echo "$0: warning: Ignoring -y option (no longer needed)." >&2
|
||||
;;
|
||||
-*)
|
||||
echo "Unrecognized option \`$option'" 1>&2
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# for convert_system_path_to_grub_path(), font_path()
|
||||
. ${libdir}/grub/update-grub_lib
|
||||
|
||||
|
@ -43,10 +78,6 @@ if [ "$UID" != 0 ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "-y" ] ; then
|
||||
echo "$0: warning: Ignoring -y option (no longer needed)." >&2
|
||||
fi
|
||||
|
||||
set $grub_mkdevicemap dummy
|
||||
if test -f "$1"; then
|
||||
:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue