mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-03-28 16:31:06 -04:00
add conditional
This commit is contained in:
parent
6411db58ef
commit
387d192327
@ -73,8 +73,10 @@ ventoy_unpack_initramfs() {
|
||||
for vtx in '1F8B zcat' '1F9E zcat' '425A bzcat' '5D00 lzcat' 'FD37 xzcat' '894C lzopcat' '0221 lz4cat' '28B5 zstdcat' '3037 cat' '4C5A lunzip -c'; do
|
||||
if [ "${vtx:0:4}" = "${vtmagic:0:4}" ]; then
|
||||
echo "vtx=$vtx" >> $VTLOG
|
||||
dd if=$vtfile skip=$vtskip of=$vttmp iflag=skip_bytes status=none
|
||||
mv $vttmp $vtfile
|
||||
if [ $vtskip -ne 0 ]; then
|
||||
dd if=$vtfile skip=$vtskip of=$vttmp iflag=skip_bytes status=none
|
||||
mv $vttmp $vtfile
|
||||
fi
|
||||
if [ "${vtx:5}" = "xzcat" ]; then
|
||||
rm -f $VTOY_PATH/xzlog
|
||||
${vtx:5} $vtfile 2> $VTOY_PATH/xzlog | (cpio -idmu 2>>$VTLOG; cat > $vttmp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user