From 26258653b7819645c62c4974b4cde62f7702fdfc Mon Sep 17 00:00:00 2001 From: longpanda Date: Sun, 26 Jul 2020 12:12:38 +0800 Subject: [PATCH] fix the shell bug --- GRUB2/MOD_SRC/grub-2.04/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GRUB2/MOD_SRC/grub-2.04/install.sh b/GRUB2/MOD_SRC/grub-2.04/install.sh index 1369d83f..f7cc3428 100644 --- a/GRUB2/MOD_SRC/grub-2.04/install.sh +++ b/GRUB2/MOD_SRC/grub-2.04/install.sh @@ -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/