Unify file copying setup across different install scripts. Add
options for performing partial install.
This commit is contained in:
parent
efe0cddae8
commit
aa42823871
8 changed files with 212 additions and 145 deletions
|
@ -1,5 +1,3 @@
|
|||
#! /bin/sh
|
||||
set -e
|
||||
|
||||
# Make GRUB rescue image
|
||||
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||
|
@ -70,6 +68,8 @@ usage () {
|
|||
print_option_help "-v, --version" "$(gettext "print the version information and exit")"
|
||||
print_option_help "-o, --output=$filetrans" "$(gettext "save output in FILE [required]")"
|
||||
print_option_help "--modules=$(gettext "MODULES")" "$(gettext "pre-load specified modules MODULES")"
|
||||
grub_print_install_files_help
|
||||
print_option_help "--install-modules=$(gettext "MODULES")" "$(gettext "install only MODULES and their dependencies on bootable media")"
|
||||
print_option_help "--rom-directory=$(gettext "DIR")" "$(gettext "save ROM images in DIR [optional]")"
|
||||
# TRANSLATORS: xorriso is a program for creating ISOs and burning CDs
|
||||
print_option_help "--xorriso=$filetrans" "$(gettext "use FILE as xorriso [optional]")"
|
||||
|
@ -83,20 +83,15 @@ usage () {
|
|||
gettext "Mail xorriso support requests to <bug-xorriso@gnu.org>."; echo
|
||||
}
|
||||
|
||||
argument () {
|
||||
opt=$1
|
||||
shift
|
||||
|
||||
if test $# -eq 0; then
|
||||
gettext_printf "%s: option requires an argument -- \`%s'\n" "$0" "$opt" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
echo $1
|
||||
}
|
||||
|
||||
# Check the arguments.
|
||||
while test $# -gt 0
|
||||
do
|
||||
grub_process_install_options "$@"
|
||||
case "$grub_process_install_options_consumed" in
|
||||
1) shift; continue;;
|
||||
2) shift; shift; continue;;
|
||||
esac
|
||||
|
||||
option=$1
|
||||
shift
|
||||
|
||||
|
@ -171,26 +166,7 @@ mkdir -p ${iso9660_dir}/boot/grub
|
|||
|
||||
process_input_dir ()
|
||||
{
|
||||
input_dir="$1"
|
||||
platform="$2"
|
||||
mkdir -p "${iso9660_dir}/boot/grub/${platform}"
|
||||
for file in "${input_dir}/"*.mod "${input_dir}/"efiemu32.o "${input_dir}/"efiemu64.o; do
|
||||
if test -f "$file"; then
|
||||
cp -f "$file" "${iso9660_dir}/boot/grub/${platform}/"
|
||||
fi
|
||||
done
|
||||
for file in ${pkglib_DATA}; do
|
||||
if test -f "${input_dir}/${file}"; then
|
||||
cp -f "${input_dir}/${file}" "${iso9660_dir}/boot/grub/${platform}/"
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -p "${iso9660_dir}/boot/grub/locale"
|
||||
for dir in "${localedir}"/*; do
|
||||
if test -f "$dir/LC_MESSAGES/grub.mo"; then
|
||||
cp -f "$dir/LC_MESSAGES/grub.mo" "${iso9660_dir}/boot/grub/locale/${dir##*/}.mo"
|
||||
fi
|
||||
done
|
||||
grub_install_files "$1" "${iso9660_dir}/boot/grub" "$2"
|
||||
}
|
||||
|
||||
make_image ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue