X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/a4200ed99eaae5ec2b3034077d9a5ff461d5e8e8..HEAD:/INSTALL/Ventoy2Disk.sh?ds=inline diff --git a/INSTALL/Ventoy2Disk.sh b/INSTALL/Ventoy2Disk.sh index d8440d0..f08ab10 100644 --- a/INSTALL/Ventoy2Disk.sh +++ b/INSTALL/Ventoy2Disk.sh @@ -12,11 +12,11 @@ if [ -f ./ventoy/version ]; then curver=$(cat ./ventoy/version) fi -if uname -m | egrep -q 'aarch64|arm64'; then +if uname -m | grep -E -q 'aarch64|arm64'; then export TOOLDIR=aarch64 -elif uname -m | egrep -q 'x86_64|amd64'; then +elif uname -m | grep -E -q 'x86_64|amd64'; then export TOOLDIR=x86_64 -elif uname -m | egrep -q 'mips64'; then +elif uname -m | grep -E -q 'mips64'; then export TOOLDIR=mips64el else export TOOLDIR=i386 @@ -46,23 +46,25 @@ echo "############# Ventoy2Disk $* [$TOOLDIR] ################" >> ./log.txt date >> ./log.txt #decompress tool -if [ -f ./tool/$TOOLDIR/ash ]; then - echo "no need to decompress tools" >> ./log.txt -else - cd ./tool/$TOOLDIR - +echo "decompress tools" >> ./log.txt +cd ./tool/$TOOLDIR + +ls *.xz > /dev/null 2>&1 +if [ $? -eq 0 ]; then [ -f ./xzcat ] && chmod +x ./xzcat - + for file in $(ls *.xz); do + echo "decompress $file" >> ./log.txt xzcat $file > ${file%.xz} [ -f ./${file%.xz} ] && chmod +x ./${file%.xz} [ -f ./$file ] && rm -f ./$file done - cd ../../ - - chmod +x -R ./tool/$TOOLDIR fi +cd ../../ +chmod +x -R ./tool/$TOOLDIR + + if [ -f /bin/bash ]; then /bin/bash ./tool/VentoyWorker.sh $* else