[1840] 2008-08-31 Colin D Bennett <[email protected]>

Robert Millan <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 1840
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1840
Author:   robertmh
Date:     2008-08-31 16:28:32 +0000 (Sun, 31 Aug 2008)

Log Message:
-----------
2008-08-31  Colin D Bennett <[email protected]>

        * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/util/i386/pc/grub-mkrescue.in

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2008-08-31 09:28:36 UTC (rev 1839)
+++ trunk/grub2/ChangeLog	2008-08-31 16:28:32 UTC (rev 1840)
@@ -1,5 +1,9 @@
 2008-08-31  Colin D Bennett <[email protected]>
 
+	* util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
+
+2008-08-31  Colin D Bennett <[email protected]>
+
 	* commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
 	total video memory in 'vbeinfo' output; show color format details for
 	each video mode.

Modified: trunk/grub2/util/i386/pc/grub-mkrescue.in
===================================================================
--- trunk/grub2/util/i386/pc/grub-mkrescue.in	2008-08-31 09:28:36 UTC (rev 1839)
+++ trunk/grub2/util/i386/pc/grub-mkrescue.in	2008-08-31 16:28:32 UTC (rev 1840)
@@ -43,6 +43,7 @@
   -v, --version           print the version information and exit
   --modules=MODULES       pre-load specified modules MODULES
   --overlay=DIR           overlay directory DIR in the memdisk image
+                          (may be specified multiple times)
   --pkglibdir=DIR         use images from directory DIR instead of ${pkglibdir}
   --grub-mkimage=FILE     use FILE as grub-mkimage
   --image-type=TYPE       select floppy or cdrom (default)
@@ -71,7 +72,7 @@
     --modules=*)
 	modules=`echo "$option" | sed 's/--modules=//'` ;;
     --overlay=*)
-	overlay=`echo "$option" | sed 's/--overlay=//'` ;;
+	overlay=${overlay}${overlay:+ }`echo "$option" | sed 's/--overlay=//'` ;;
     --pkglibdir=*)
 	input_dir=`echo "$option" | sed 's/--pkglibdir=//'` ;;
     --grub-mkimage=*)
@@ -124,9 +125,10 @@
   echo "insmod $i"
 done > ${aux_dir}/boot/grub/grub.cfg
 
-if test "x$overlay" = x ; then : ; else
-  cp -dpR ${overlay}/* ${aux_dir}/
-fi
+for d in ${overlay}; do
+  echo "Overlaying $d"
+  cp -dpR "${d}"/* "${aux_dir}"/
+done
 
 if [ "x${image_type}" = xfloppy -o "x${emulation}" = xfloppy ] ; then
   # build memdisk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.