]>
glassweightruler.freedombox.rocks Git - Ventoy.git/blob - INSTALL/Ventoy2Disk.sh
5 if ! [ -f .
/tool
/ventoy_lib.sh
]; then
6 if [ -f ${0%Ventoy2Disk.sh}/tool
/ventoy_lib.sh
]; then
11 if [ -f .
/ventoy
/version
]; then
12 curver
=$(cat ./ventoy/version)
15 if uname
-m | grep -E -q 'aarch64|arm64'; then
16 export TOOLDIR
=aarch64
17 elif uname
-m | grep -E -q 'x86_64|amd64'; then
19 elif uname
-m | grep -E -q 'mips64'; then
20 export TOOLDIR
=mips64el
24 export PATH
="./tool/$TOOLDIR:$PATH"
28 echo '**********************************************'
29 echo " Ventoy: $curver $TOOLDIR"
30 echo " longpanda admin@ventoy.net"
31 echo " https://www.ventoy.net"
32 echo '**********************************************'
36 if ! [ -f .
/boot
/boot.img
]; then
37 if [ -d .
/grub
]; then
38 echo "Don't run Ventoy2Disk.sh here, please download the released install package, and run the script in it."
40 echo "Please run under the correct directory!"
45 echo "############# Ventoy2Disk $* [$TOOLDIR] ################" >> .
/log.txt
49 echo "decompress tools" >> .
/log.txt
52 ls *.xz
> /dev
/null
2>&1
54 [ -f .
/xzcat
] && chmod +x .
/xzcat
56 for file in $(ls *.xz); do
57 echo "decompress $file" >> .
/log.txt
58 xzcat
$file > ${file%.xz}
59 [ -f .
/${file%.xz} ] && chmod +x .
/${file%.xz}
60 [ -f .
/$file ] && rm -f .
/$file
65 chmod +x
-R .
/tool
/$TOOLDIR
68 if [ -f /bin
/bash
]; then
69 /bin
/bash .
/tool
/VentoyWorker.sh $
*
71 ash .
/tool
/VentoyWorker.sh $
*
74 if [ -n "$OLDDIR" ]; then
76 if [ "$CURDIR" != "$OLDDIR" ]; then