3 if [ "$1" = "CI" ]; then
9 dos2unix
-q .
/tool
/ventoy_lib.sh
10 dos2unix
-q .
/tool
/VentoyWorker.sh
12 . .
/tool
/ventoy_lib.sh
14 GRUB_DIR
=..
/GRUB
2/INSTALL
17 if ! [ -d $GRUB_DIR ]; then
18 echo "$GRUB_DIR not exist"
29 sh language.sh
|| exit 1
37 dd if=/dev
/zero of
=img.bin bs
=1M count
=256 status
=none
39 losetup
-P $LOOP img.bin
41 while ! grep -q 524288 /sys
/block
/${LOOP#/dev/}/size
2>/dev
/null
; do
46 format_ventoy_disk_mbr
0 $LOOP fdisk
48 $GRUB_DIR/sbin
/grub
-bios-setup --skip-fs-probe --directory="./grub/i386-pc" $LOOP
50 curver
=$(get_ventoy_version_from_cfg ./grub/grub.cfg)
52 tmpmnt
=.
/ventoy
-${curver}-mnt
53 tmpdir
=.
/ventoy
-${curver}
58 mount
${LOOP}p2
$tmpmnt
62 # First copy grub.cfg file, to make it locate at front of the part2
63 cp $OPT .
/grub
/grub.cfg
$tmpmnt/grub
/
65 ls -1 .
/grub
/ | grep -v 'grub\.cfg' | while read line
; do
66 cp $OPT .
/grub
/$line $tmpmnt/grub
/
69 cp $OPT .
/ventoy
$tmpmnt/
70 cp $OPT .
/EFI
$tmpmnt/
71 cp $OPT .
/tool
/ENROLL_THIS_KEY_IN_MOKMANAGER.cer
$tmpmnt/
75 cp $OPT .
/tool
/i
386/mount.exfat
-fuse $tmpmnt/tool
/mount.exfat
-fuse_i386
76 cp $OPT .
/tool
/x
86_
64/mount.exfat
-fuse $tmpmnt/tool
/mount.exfat
-fuse_x86_64
77 cp $OPT .
/tool
/aarch
64/mount.exfat
-fuse $tmpmnt/tool
/mount.exfat
-fuse_aarch64
79 rm -f $tmpmnt/grub
/i386
-pc/*.img
82 umount
$tmpmnt && rm -rf $tmpmnt
87 mkdir -p $tmpdir/ventoy
88 echo $curver > $tmpdir/ventoy
/version
89 dd if=$LOOP of
=$tmpdir/boot
/boot.img bs
=1 count
=512 status
=none
90 dd if=$LOOP of
=$tmpdir/boot
/core.img bs
=512 count
=2047 skip
=1 status
=none
91 xz
--check=crc32
$tmpdir/boot
/core.img
93 cp $OPT .
/tool
$tmpdir/
94 rm -f $tmpdir/ENROLL_THIS_KEY_IN_MOKMANAGER.cer
95 cp $OPT Ventoy2Disk.sh
$tmpdir/
96 cp $OPT VentoyWeb.sh
$tmpdir/
97 cp $OPT README
$tmpdir/
98 cp $OPT plugin
$tmpdir/
99 cp $OPT CreatePersistentImg.sh
$tmpdir/
100 dos2unix
-q $tmpdir/Ventoy2Disk.sh
101 dos2unix
-q $tmpdir/VentoyWeb.sh
102 dos2unix
-q $tmpdir/CreatePersistentImg.sh
104 cp $OPT ..
/LinuxGUI
/WebUI
$tmpdir/
105 sed 's/.*SCRIPT_DEL_THIS \(.*\)/\1/g' -i $tmpdir/WebUI
/index.html
108 dd status
=none
if=$LOOP of
=$tmpdir/ventoy
/ventoy.disk.img bs
=512 count
=$VENTOY_SECTOR_NUM skip
=$part2_start_sector
109 xz
--check=crc32
$tmpdir/ventoy
/ventoy.disk.img
111 losetup
-d $LOOP && rm -f img.bin
113 rm -f ventoy
-${curver}-linux.
tar.gz
118 for d
in i386 x86_64 aarch64
; do
120 for file in $(ls); do
121 if [ "$file" != "xzcat" ]; then
122 xz
--check=crc32
$file
129 find $tmpdir/ -type d
-exec chmod 755 "{}" +
130 find $tmpdir/ -type f
-exec chmod 644 "{}" +
131 chmod +x
$tmpdir/Ventoy2Disk.sh
132 chmod +x
$tmpdir/VentoyWeb.sh
133 chmod +x
$tmpdir/CreatePersistentImg.sh
135 tar -czvf ventoy
-${curver}-linux.
tar.gz
$tmpdir
139 rm -f ventoy
-${curver}-windows.
zip
140 cp $OPT Ventoy2Disk
*.exe
$tmpdir/
141 cp $OPT $LANG_DIR/languages.ini
$tmpdir/ventoy
/
148 zip -r ventoy
-${curver}-windows.
zip $tmpdir/
152 echo "=============== run livecd.sh ==============="
157 mv ..
/LiveCD
/ventoy
*.iso .
/
159 if [ -e ventoy
-${curver}-windows.
zip ] && [ -e ventoy
-${curver}-linux.
tar.gz
]; then
160 echo -e "\n ============= SUCCESS =================\n"
162 echo -e "\n ============= FAILED =================\n"