]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
fix the shell bug
authorlongpanda <admin@ventoy.net>
Sun, 26 Jul 2020 04:12:38 +0000 (12:12 +0800)
committerlongpanda <admin@ventoy.net>
Sun, 26 Jul 2020 04:12:38 +0000 (12:12 +0800)
GRUB2/MOD_SRC/grub-2.04/install.sh

index 1369d83f86f00fb8b40c401b8abcf308c8a7ad4a..f7cc3428e1a0f8e9613d8927c337c636c67ca4ae 100644 (file)
@@ -38,7 +38,7 @@ if [ "$1" = "uefi" ]; then
 
     #copy other modules
     ls -1 $VT_DIR/GRUB2/INSTALL/lib/grub/x86_64-efi/ | egrep '\.(lst|mod)$' | while read line; do
-        if ! echo $all_modules | grep -q "${line%.mod} "; then
+        if ! echo $all_modules | grep -q " ${line%.mod} "; then
             echo "Copy $line ..."
             rm -f $VT_DIR/INSTALL/grub/x86_64-efi/$line
             cp -a $VT_DIR/GRUB2/INSTALL/lib/grub/x86_64-efi/$line    $VT_DIR/INSTALL/grub/x86_64-efi/
@@ -53,7 +53,7 @@ else
     
     #copy other modules
     ls -1 $VT_DIR/GRUB2/INSTALL/lib/grub/i386-pc/ | egrep '\.(lst|mod)$' | while read line; do
-        if ! echo $all_modules | grep -q "${line%.mod} "; then
+        if ! echo $all_modules | grep -q " ${line%.mod} "; then
             echo "Copy $line ..."
             rm -f $VT_DIR/INSTALL/grub/i386-pc/$line
             cp -a $VT_DIR/GRUB2/INSTALL/lib/grub/i386-pc/$line    $VT_DIR/INSTALL/grub/i386-pc/