+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.
# 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.
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
}
{
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
}