]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - IMG/cpio/ventoy/tool/vtoytool_install.sh
linux raw boot
[Ventoy.git] / IMG / cpio / ventoy / tool / vtoytool_install.sh
1 #!/ventoy/busybox/sh
2 #************************************************************************************
3 # Copyright (c) 2020, longpanda <admin@ventoy.net>
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation; either version 3 of the
8 # License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 #
18 #************************************************************************************
19
20 echo "#### install vtoytool #####" >> $VTLOG
21
22 if ! [ -e $BUSYBOX_PATH/ar ]; then
23 $BUSYBOX_PATH/ln -s $VTOY_PATH/tool/ar $BUSYBOX_PATH/ar
24 fi
25
26 for vtdir in $(ls $VTOY_PATH/tool/vtoytool/); do
27 echo "try $VTOY_PATH/tool/vtoytool/$vtdir/ ..." >> $VTLOG
28 if $VTOY_PATH/tool/vtoytool/$vtdir/vtoytool_64 --install 2>>$VTLOG; then
29 echo "vtoytool_64 OK" >> $VTLOG
30 break
31 fi
32
33 if $VTOY_PATH/tool/vtoytool/$vtdir/vtoytool_32 --install 2>>$VTLOG; then
34 echo "vtoytool_32 OK" >> $VTLOG
35 break
36 fi
37 done
38
39 if $VTOY_PATH/tool/vtoy_fuse_iso_64 -t 2>>$VTLOG; then
40 echo "use vtoy_fuse_iso_64" >>$VTLOG
41 $BUSYBOX_PATH/cp -a $VTOY_PATH/tool/vtoy_fuse_iso_64 $VTOY_PATH/tool/vtoy_fuse_iso
42 else
43 echo "use vtoy_fuse_iso_32" >>$VTLOG
44 $BUSYBOX_PATH/cp -a $VTOY_PATH/tool/vtoy_fuse_iso_32 $VTOY_PATH/tool/vtoy_fuse_iso
45 fi
46
47 if $VTOY_PATH/tool/unsquashfs_64 -t 2>>$VTLOG; then
48 echo "use unsquashfs_64" >>$VTLOG
49 $BUSYBOX_PATH/cp -a $VTOY_PATH/tool/unsquashfs_64 $VTOY_PATH/tool/vtoy_unsquashfs
50 else
51 echo "use unsquashfs_32" >>$VTLOG
52 $BUSYBOX_PATH/cp -a $VTOY_PATH/tool/unsquashfs_32 $VTOY_PATH/tool/vtoy_unsquashfs
53 fi
54
55
56
57 if $VTOY_PATH/tool/unsquashfs_64 -t 2>>$VTLOG; then
58 echo "use unsquashfs_64" >>$VTLOG
59 $BUSYBOX_PATH/cp -a $VTOY_PATH/tool/unsquashfs_64 $VTOY_PATH/tool/vtoy_unsquashfs
60 else
61 echo "use unsquashfs_32" >>$VTLOG
62 $BUSYBOX_PATH/cp -a $VTOY_PATH/tool/unsquashfs_32 $VTOY_PATH/tool/vtoy_unsquashfs
63 fi
64