Modernized Shell Script functions.

egrep -> grep -e
This commit is contained in:
Mou Ikkai 2020-08-24 07:50:21 -04:00 committed by GitHub
parent 1f3161f354
commit 293fe62232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ if [ "$1" = "uefi" ]; then
cp -a $VT_DIR/GRUB2/PXE/grub2/x86_64-efi/normal.mod $VT_DIR/INSTALL/grub/x86_64-efi/normal.mod || exit 1
#copy other modules
ls -1 $VT_DIR/GRUB2/INSTALL/lib/grub/x86_64-efi/ | egrep '\.(lst|mod)$' | while read line; do
ls -1 $VT_DIR/GRUB2/INSTALL/lib/grub/x86_64-efi/ | grep -e '\.(lst|mod)$' | while read line; do
if ! echo $all_modules | grep -q " ${line%.mod} "; then
echo "Copy $line ..."
rm -f $VT_DIR/INSTALL/grub/x86_64-efi/$line
@ -50,7 +50,7 @@ else
cp -a $VT_DIR/GRUB2/INSTALL/lib/grub/i386-pc/boot.img $VT_DIR/INSTALL/grub/i386-pc/boot.img || exit 1
#copy other modules
ls -1 $VT_DIR/GRUB2/INSTALL/lib/grub/i386-pc/ | egrep '\.(lst|mod)$' | while read line; do
ls -1 $VT_DIR/GRUB2/INSTALL/lib/grub/i386-pc/ | grep -e '\.(lst|mod)$' | while read line; do
if ! echo $all_modules | grep -q " ${line%.mod} "; then
echo "Copy $line ..."
rm -f $VT_DIR/INSTALL/grub/i386-pc/$line