Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
676ae725
Commit
676ae725
authored
Dec 21, 2022
by
longpanda
Browse files
Fix the egrep warning. (#2083)
parent
54dd35d2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
21 deletions
+21
-21
INSTALL/Ventoy2Disk.sh
INSTALL/Ventoy2Disk.sh
+3
-3
INSTALL/VentoyPlugson.sh
INSTALL/VentoyPlugson.sh
+5
-5
INSTALL/VentoyWeb.sh
INSTALL/VentoyWeb.sh
+3
-3
INSTALL/tool/VentoyWorker.sh
INSTALL/tool/VentoyWorker.sh
+2
-2
Vlnk/VentoyVlnk.sh
Vlnk/VentoyVlnk.sh
+8
-8
No files found.
INSTALL/Ventoy2Disk.sh
View file @
676ae725
...
...
@@ -12,11 +12,11 @@ if [ -f ./ventoy/version ]; then
curver
=
$(
cat
./ventoy/version
)
fi
if
uname
-m
|
e
grep
-q
'aarch64|arm64'
;
then
if
uname
-m
|
grep
-E
-q
'aarch64|arm64'
;
then
export
TOOLDIR
=
aarch64
elif
uname
-m
|
e
grep
-q
'x86_64|amd64'
;
then
elif
uname
-m
|
grep
-E
-q
'x86_64|amd64'
;
then
export
TOOLDIR
=
x86_64
elif
uname
-m
|
e
grep
-q
'mips64'
;
then
elif
uname
-m
|
grep
-E
-q
'mips64'
;
then
export
TOOLDIR
=
mips64el
else
export
TOOLDIR
=
i386
...
...
INSTALL/VentoyPlugson.sh
View file @
676ae725
...
...
@@ -30,13 +30,13 @@ fi
OLDDIR
=
$(
pwd
)
machine
=
$(
uname
-m
)
if
echo
$machine
|
e
grep
-q
'aarch64|arm64'
;
then
if
echo
$machine
|
grep
-E
-q
'aarch64|arm64'
;
then
TOOLDIR
=
aarch64
elif
echo
$machine
|
e
grep
-q
'x86_64|amd64'
;
then
elif
echo
$machine
|
grep
-E
-q
'x86_64|amd64'
;
then
TOOLDIR
=
x86_64
elif
echo
$machine
|
e
grep
-q
'mips64'
;
then
elif
echo
$machine
|
grep
-E
-q
'mips64'
;
then
TOOLDIR
=
mips64el
elif
echo
$machine
|
e
grep
-q
'i[3-6]86'
;
then
elif
echo
$machine
|
grep
-E
-q
'i[3-6]86'
;
then
TOOLDIR
=
i386
else
echo
"Unsupported machine type
$machine
"
...
...
@@ -122,7 +122,7 @@ if echo $DISK | grep -q "[a-z]d[a-z][1-9]"; then
DISK
=
${
DISK
:0:-1
}
fi
if
echo
$DISK
|
e
grep
-q
"/dev/nvme|/dev/mmcblk/dev/nbd"
;
then
if
echo
$DISK
|
grep
-E
-q
"/dev/nvme|/dev/mmcblk/dev/nbd"
;
then
if
echo
$DISK
|
grep
-q
"p[1-9]$"
;
then
DISK
=
${
DISK
:0:-2
}
fi
...
...
INSTALL/VentoyWeb.sh
View file @
676ae725
...
...
@@ -23,11 +23,11 @@ fi
OLDDIR
=
$(
pwd
)
if
uname
-m
|
e
grep
-q
'aarch64|arm64'
;
then
if
uname
-m
|
grep
-E
-q
'aarch64|arm64'
;
then
TOOLDIR
=
aarch64
elif
uname
-m
|
e
grep
-q
'x86_64|amd64'
;
then
elif
uname
-m
|
grep
-E
-q
'x86_64|amd64'
;
then
TOOLDIR
=
x86_64
elif
uname
-m
|
e
grep
-q
'mips64'
;
then
elif
uname
-m
|
grep
-E
-q
'mips64'
;
then
TOOLDIR
=
mips64el
else
TOOLDIR
=
i386
...
...
INSTALL/tool/VentoyWorker.sh
View file @
676ae725
...
...
@@ -434,7 +434,7 @@ elif [ "$MODE" = "install" -a -n "$NONDESTRUCTIVE" ]; then
PART1_BLKID
=
$(
blkid
$PART1
)
blkid
$PART1
if
echo
$PART1_BLKID
|
e
grep
-q
-i
'TYPE=ntfs|TYPE=.ntfs'
;
then
if
echo
$PART1_BLKID
|
grep
-E
-q
-i
'TYPE=ntfs|TYPE=.ntfs'
;
then
echo
"Partition 1 contains NTFS filesystem"
which ntfsresize
...
...
@@ -452,7 +452,7 @@ elif [ "$MODE" = "install" -a -n "$NONDESTRUCTIVE" ]; then
echo
"###[FAIL] ntfsresize failed."
exit
1
fi
elif
echo
$PART1_BLKID
|
e
grep
-q
-i
'TYPE=ext[2-4]|TYPE=.ext[2-4]'
;
then
elif
echo
$PART1_BLKID
|
grep
-E
-q
-i
'TYPE=ext[2-4]|TYPE=.ext[2-4]'
;
then
echo
"Partition 1 contains EXT filesystem"
which resize2fs
...
...
Vlnk/VentoyVlnk.sh
View file @
676ae725
...
...
@@ -19,7 +19,7 @@ vlog() {
}
vlnk_suffix
()
{
echo
$1
|
e
grep
-q
'.*(.vlnk.iso|.vlnk.img|.vlnk.wim|.vlnk.vhd|.vlnk.vhdx|.vlnk.efi|.vlnk.vtoy|.vlnk.dat)$'
echo
$1
|
grep
-E
-q
'.*(.vlnk.iso|.vlnk.img|.vlnk.wim|.vlnk.vhd|.vlnk.vhdx|.vlnk.efi|.vlnk.vtoy|.vlnk.dat)$'
}
...
...
@@ -38,13 +38,13 @@ for t in 'mountpoint' 'readlink' 'xzcat'; do
done
machine
=
$(
uname
-m
)
if
echo
$machine
|
e
grep
-q
'aarch64|arm64'
;
then
if
echo
$machine
|
grep
-E
-q
'aarch64|arm64'
;
then
TOOLDIR
=
aarch64
elif
echo
$machine
|
e
grep
-q
'x86_64|amd64'
;
then
elif
echo
$machine
|
grep
-E
-q
'x86_64|amd64'
;
then
TOOLDIR
=
x86_64
elif
echo
$machine
|
e
grep
-q
'mips64'
;
then
elif
echo
$machine
|
grep
-E
-q
'mips64'
;
then
TOOLDIR
=
mips64el
elif
echo
$machine
|
e
grep
-q
'i[3-6]86'
;
then
elif
echo
$machine
|
grep
-E
-q
'i[3-6]86'
;
then
TOOLDIR
=
i386
else
echo
"Unsupported machine type
$machine
"
...
...
@@ -103,7 +103,7 @@ if [ "$CMD" = "c" ]; then
exit
1
fi
if
echo
$IMG
|
e
grep
-q
-i
'.*(.iso|.img|.wim|.vhd|.vhdx|.efi|.vtoy|.dat)$'
;
then
if
echo
$IMG
|
grep
-E
-q
-i
'.*(.iso|.img|.wim|.vhd|.vhdx|.efi|.vtoy|.dat)$'
;
then
:
else
echo
"This file is not supported for vlnk!"
...
...
@@ -157,7 +157,7 @@ if [ "$CMD" = "c" ]; then
FS
=
$(
grep
"
${
FULLDIR
}
"
/proc/mounts |
awk
'{print $3}'
)
vlog
"File system of
$DEV
is
$FS
"
if
echo
$FS
|
e
grep
-q
"ext2|ext3|ext4|exfat|vfat|fat32|fat16|fat12|ntfs|xfs|udf"
;
then
if
echo
$FS
|
grep
-E
-q
"ext2|ext3|ext4|exfat|vfat|fat32|fat16|fat12|ntfs|xfs|udf"
;
then
vlog
"FS OK"
elif
[
"
$FS
"
=
"fuseblk"
]
;
then
vlog
"
$DEV
is fuseblk"
...
...
@@ -203,7 +203,7 @@ if [ "$CMD" = "c" ]; then
if
[
-f
"/sys/class/block/
$IMGPARTITION
/start"
]
;
then
PARTSTART
=
$(
cat
"/sys/class/block/
$IMGPARTITION
/start"
)
if
echo
$IMGPARTITION
|
e
grep
-q
'mmc|nbd|nvme'
;
then
if
echo
$IMGPARTITION
|
grep
-E
-q
'mmc|nbd|nvme'
;
then
DISK
=
$(
echo
/dev/
$IMGPARTITION
|
sed
"s/^
\(
.*
\)
p[0-9][0-9]*
$/
\1
/"
)
else
DISK
=
$(
echo
/dev/
$IMGPARTITION
|
sed
"s/^
\(
.*[^0-9]
\)
[0-9][0-9]*
$/
\1
/"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment