X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/7b08954e57f5cc35e13293fed03c33fbc7756bbc..HEAD:/INSTALL/VentoyWeb.sh diff --git a/INSTALL/VentoyWeb.sh b/INSTALL/VentoyWeb.sh index bb6a910..537348a 100644 --- a/INSTALL/VentoyWeb.sh +++ b/INSTALL/VentoyWeb.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash print_usage() { echo 'Usage: VentoyWeb.sh [ OPTION ]' @@ -23,10 +23,12 @@ fi OLDDIR=$(pwd) -if uname -a | egrep -q 'aarch64|arm64'; then +if uname -m | grep -E -q 'aarch64|arm64'; then TOOLDIR=aarch64 -elif uname -a | egrep -q 'x86_64|amd64'; then +elif uname -m | grep -E -q 'x86_64|amd64'; then TOOLDIR=x86_64 +elif uname -m | grep -E -q 'mips64'; then + TOOLDIR=mips64el else TOOLDIR=i386 fi @@ -43,6 +45,7 @@ if [ ! -f ./boot/boot.img ]; then if [ -d ./grub ]; then echo "Don't run VentoyWeb.sh here, please download the released install package, and run the script in it." else + echo "Current directory is $PWD" echo "Please run under the correct directory!" fi exit 1 @@ -97,6 +100,11 @@ if [ -f ./tool/$TOOLDIR/V2DServer.xz ]; then chmod +x ./tool/$TOOLDIR/V2DServer fi + +V2DServer "$HOST" "$PORT" & +wID=$! +sleep 1 + vtVer=$(cat ventoy/version) echo "" echo "===============================================================" @@ -112,7 +120,7 @@ echo "" echo "################## Press Ctrl + C to exit #####################" echo "" -V2DServer "$HOST" "$PORT" +wait $wID if [ -n "$OLDDIR" ]; then CURDIR=$(pwd)