]>
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 | egrep -q 'aarch64|arm64'; then
16 export TOOLDIR
=aarch64
17 elif uname
-m | egrep -q 'x86_64|amd64'; then
19 elif uname
-m | egrep -q 'mips64'; then
20 export TOOLDIR
=mips64el
24 export PATH
="./tool/$TOOLDIR:$PATH"
30 echo '**********************************************'
31 echo " Ventoy: $curver $TOOLDIR"
32 echo " longpanda admin@ventoy.net"
33 echo " https://www.ventoy.net"
34 echo '**********************************************'
38 if ! [ -f .
/boot
/boot.img
]; then
39 if [ -d .
/grub
]; then
40 echo "Don't run Ventoy2Disk.sh here, please download the released install package, and run the script in it."
42 echo "Please run under the correct directory!"
47 echo "############# Ventoy2Disk $* [$TOOLDIR] ################" >> .
/log.txt
51 if [ -f .
/tool
/$TOOLDIR/ash
]; then
52 echo "no need to decompress tools" >> .
/log.txt
56 [ -f .
/xzcat
] && chmod +x .
/xzcat
58 for file in $(ls *.xz); do
59 xzcat
$file > ${file%.xz}
60 [ -f .
/${file%.xz} ] && chmod +x .
/${file%.xz}
61 [ -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