~ubuntu-branches/debian/stretch/grub2/stretch

« back to all changes in this revision

Viewing changes to util/i386/efi/grub-install.in

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-06-15 12:45:35 UTC
  • mto: (1.14.1 upstream) (17.3.18 experimental)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: james.westby@ubuntu.com-20100615124535-9vfbis4kzv0h5bgy
Tags: upstream-1.98+20100614
ImportĀ upstreamĀ versionĀ 1.98+20100614

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
34
34
localedir=@datadir@/locale
35
35
 
 
36
self=`basename $0`
 
37
 
36
38
grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
37
39
grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}`
38
40
grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`
50
52
# Print the usage.
51
53
usage () {
52
54
    cat <<EOF
53
 
Usage: grub-install [OPTION]
 
55
Usage: $self [OPTION]
54
56
Install GRUB on your EFI partition.
55
57
 
56
58
  -h, --help              print this message and exit
64
66
  --no-floppy             do not probe any floppy drive
65
67
  --recheck               probe a device map even if it already exists
66
68
 
67
 
grub-install copies GRUB images into the DIR/boot directory specified by
 
69
$self copies GRUB images into the DIR/boot directory specified by
68
70
--root-directory.
69
71
 
70
72
Report bugs to <bug-grub@gnu.org>.
71
73
EOF
72
74
}
73
75
 
 
76
argument () {
 
77
  opt=$1
 
78
  shift
 
79
 
 
80
  if test $# -eq 0; then
 
81
      echo "$0: option requires an argument -- '$opt'" 1>&2
 
82
      exit 1
 
83
  fi
 
84
  echo $1
 
85
}
 
86
 
74
87
# Check the arguments.
75
 
for option in "$@"; do
 
88
while test $# -gt 0
 
89
do
 
90
    option=$1
 
91
    shift
 
92
 
76
93
    case "$option" in
77
94
    -h | --help)
78
95
        usage
79
96
        exit 0 ;;
80
97
    -v | --version)
81
 
        echo "grub-install (GNU GRUB ${PACKAGE_VERSION})"
 
98
        echo "$self (${PACKAGE_NAME}) ${PACKAGE_VERSION}"
82
99
        exit 0 ;;
 
100
 
 
101
    --modules)
 
102
        modules=`argument $option "$@"`; shift ;;
83
103
    --modules=*)
84
104
        modules=`echo "$option" | sed 's/--modules=//'` ;;
 
105
 
 
106
    --root-directory)
 
107
        rootdir=`argument $option "$@"`; shift ;;
85
108
    --root-directory=*)
86
109
        rootdir=`echo "$option" | sed 's/--root-directory=//'` ;;
 
110
 
 
111
    --grub-mkimage)
 
112
        grub_mkimage=`argument $option "$@"`; shift ;;
87
113
    --grub-mkimage=*)
88
114
        grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
 
115
 
 
116
    --grub-mkdevicemap)
 
117
        grub_mkdevicemap=`argument $option "$@"`; shift ;;
89
118
    --grub-mkdevicemap=*)
90
119
        grub_mkdevicemap=`echo "$option" | sed 's/--grub-mkdevicemap=//'` ;;
 
120
 
 
121
    --grub-probe)
 
122
        grub_probe=`argument $option "$@"`; shift ;;
91
123
    --grub-probe=*)
92
124
        grub_probe=`echo "$option" | sed 's/--grub-probe=//'` ;;
 
125
 
93
126
    --no-floppy)
94
127
        no_floppy="--no-floppy" ;;
95
128
    --recheck)
219
252
echo "Installation finished. No error reported."
220
253
echo "This is the contents of the device map $device_map."
221
254
echo "Check if this is correct or not. If any of the lines is incorrect,"
222
 
echo "fix it and re-run the script \`grub-install'."
 
255
echo "fix it and re-run the script \`$self'."
223
256
echo
224
257
 
225
258
cat $device_map