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>
Add support for Apple HFS+ filesystems.

View file

@ -12,7 +12,7 @@
# PARTICULAR PURPOSE.
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
* Copyright (C) 2002, 2005 Free Software Foundation, Inc.
@ -41,12 +41,13 @@ void
grub_init_all (void)
{
EOF
(
cat grub_modules_init.lst
for i in $*; do
echo $i':'
done
) | 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;}'
while read line; do
file=`echo $line | cut -f1 -d:`
if echo $@ | grep $file >/dev/null; then
echo $line | sed -e 's/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_init ();/'
fi
done < grub_modules_init.lst
cat <<EOF
}
@ -58,12 +59,12 @@ grub_fini_all (void)
{
EOF
(
cat grub_modules_init.lst
for i in $*; do
echo $i':'
done
) | 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;}'
while read line; do
file=`echo $line | cut -f1 -d:`
if echo $@ | grep $file >/dev/null; then
echo $line | sed -e 's/.*GRUB_MOD_INIT *(\([a-zA-Z0-9_]*\)).*/ grub_\1_fini ();/'
fi
done < grub_modules_init.lst
cat <<EOF
}