* util/grub-mkstandalone.in: Fix help messages. Gettextize.

* util/grub-install.in: Gettextize.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mkconfig_lib.in: Replace gettext with echo -n and not echo
	if not available.
	(grub_warn): Gettextize.
	* util/grub-mknetdir.in: Gettextize.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* po/POTFILES-shell.in: Regenerate.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-03 11:42:22 +01:00
parent 69edd81ab7
commit a32d5c712d
18 changed files with 265 additions and 204 deletions

View file

@ -2,7 +2,7 @@
set -e
# Make GRUB rescue image
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -30,6 +30,7 @@ PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
datadir="@datadir@"
self=`basename $0`
@ -39,27 +40,31 @@ format=
grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
source=
. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
usage () {
cat <<EOF
Usage: $self [OPTION] SOURCE...
Make GRUB rescue image.
-h, --help print this message and exit
-v, --version print the version information and exit
-o, --output=FILE save output in FILE [required]
-d, --directory=DIR use images and modules under DIR [default=%s/@platform@]
-O, --format=FORMAT generate an image in format
available formats: %s
-C, --compression=(xz|none|auto) choose the compression to use
--modules=MODULES pre-load specified modules MODULES
--grub-mkimage=FILE use FILE as grub-mkimage
$self generates a standalone image (containing all modules) in the selected format
Report bugs to <bug-grub@gnu.org>.
EOF
formats="i386-coreboot i386-multiboot i386-pc i386-pc-pxe i386-efi i386-ieee1275 i386-qemu x86_64-efi mipsel-yeeloong-flash mipsel-fuloong2f-flash mipsel-loongson-elf powerpc-ieee1275 sparc64-ieee1275-raw sparc64-ieee1275-aout ia64-efi mips-arc mipsel-qemu_mips-elf mips-qemu_mips-flash mipsel-qemu_mips-flash mips-qemu_mips-elf"
gettext_printf "Usage: %s [OPTION] SOURCE...\n" "$self"
gettext "Make GRUB rescue image."; echo
echo
printf " -h, --help %s\n" "$(gettext "print this message and exit")"
printf " -v, --version %s\n" "$(gettext "print the version information and exit")"
printf " -o, --output=%-11s%s\n" "$(gettext FILE)" "$(gettext "save output in FILE [required]")"
dir_msg="$(gettext_printf "use images and modules under DIR [default=%s/<platform>]" "${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})")"
printf " -d, --directory=%-8s%s\n" \
"DIR" "$dir_msg"
printf " -O, --format=%-11s%s" "$(gettext "FORMAT")" "$(gettext "generate an image in format")"; echo
printf " %s %s\n" "$(gettext "available formats:")" "$formats"
echo
printf " -C, --compression=(xz|none|auto) %s\n" "$(gettext "choose the compression to use")"
printf " --modules=%-14s%s\n" "$(gettext "MODULES")" "$(gettext "pre-load specified modules MODULES")"
printf " --grub-mkimage=%-9s%s\n" "$(gettext "FILE")" "$(gettext "use FILE as grub-mkimage")"
echo
gettext_printf "%s generates a standalone image (containing all modules) in the selected format" "$self"
echo
gettext "Report bugs to <bug-grub@gnu.org>."; echo
}
argument () {
@ -67,7 +72,7 @@ argument () {
shift
if test $# -eq 0; then
echo "$0: option requires an argument -- '$opt'" 1>&2
gettext_printf "%s: option requires an argument -- '%s'\n" "$0" "$opt" 1>&2
exit 1
fi
echo $1
@ -123,14 +128,15 @@ do
done
if [ "x${output_image}" = x ] ; then
echo "output file must be given" >&2
gettext "output file must be specified" >&2
echo >&2
usage
exit 1
fi
if [ "x${format}" = x ] ; then
echo "format must be given" >&2
usage
gettext "format must be specified" >&2
echo >&2
exit 1
fi