From: longpanda Date: Sun, 26 Jul 2020 04:12:38 +0000 (+0800) Subject: fix the shell bug X-Git-Tag: v1.0.18~7 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/commitdiff_plain/26258653b7819645c62c4974b4cde62f7702fdfc?hp=--cc fix the shell bug --- 26258653b7819645c62c4974b4cde62f7702fdfc diff --git a/GRUB2/MOD_SRC/grub-2.04/install.sh b/GRUB2/MOD_SRC/grub-2.04/install.sh index 1369d83..f7cc342 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/