2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>

* geninit.sh: Made more robust, and more portable.
This commit is contained in:
okuji 2005-12-25 17:04:32 +00:00
parent b5179ea0ef
commit 4750f5f13d
2 changed files with 18 additions and 13 deletions

View file

@ -1,3 +1,7 @@
2005-12-25 Yoshinori K. Okuji <okuji@enbug.org>
* geninit.sh: Made more robust, and more portable.
2005-12-25 Marco Gerards <marco@gnu.org> 2005-12-25 Marco Gerards <marco@gnu.org>
Add support for Apple HFS+ filesystems. Add support for Apple HFS+ filesystems.

View file

@ -12,7 +12,7 @@
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
cat <<EOF cat <<EOF
/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! */ /* This file is automatically generated by geninit.sh. DO NOT EDIT! */
/* /*
* GRUB -- GRand Unified Bootloader * GRUB -- GRand Unified Bootloader
* Copyright (C) 2002, 2005 Free Software Foundation, Inc. * Copyright (C) 2002, 2005 Free Software Foundation, Inc.
@ -41,12 +41,13 @@ void
grub_init_all (void) grub_init_all (void)
{ {
EOF EOF
(
cat grub_modules_init.lst while read line; do
for i in $*; do file=`echo $line | cut -f1 -d:`
echo $i':' if echo $@ | grep $file >/dev/null; then
done echo $line | sed -e 's/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_init ();/'
) | sort -r | uniq -d -W1 -t':' | sed -n '/GRUB_MOD_INIT *([a-zA-Z0-9_]*)/{s/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_init ();/;p;}' fi
done < grub_modules_init.lst
cat <<EOF cat <<EOF
} }
@ -58,12 +59,12 @@ grub_fini_all (void)
{ {
EOF EOF
( while read line; do
cat grub_modules_init.lst file=`echo $line | cut -f1 -d:`
for i in $*; do if echo $@ | grep $file >/dev/null; then
echo $i':' echo $line | sed -e 's/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_fini ();/'
done fi
) | sort -r | uniq -d -W1 -t':' | sed -n '/GRUB_MOD_INIT *([a-zA-Z0-9_]*)/{s/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_fini ();/;p;}' done < grub_modules_init.lst
cat <<EOF cat <<EOF
} }